Class BetaResponseToolAdditionBlock
-
- All Implemented Interfaces:
public final class BetaResponseToolAdditionBlockAn entry of a
compactionblock'stool_changes: a tool the compacted range made available, as a reference to atoolsentry or MCP toolset, or as the tool definition in effect at the end of the range, by value. Send it back unchanged.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaResponseToolAdditionBlock.BuilderA builder for BetaResponseToolAdditionBlock.
public final classBetaResponseToolAdditionBlock.ToolThe tool made available: a reference to a
toolsentry or MCP toolset, or atool_definitioncarrying the definition by value.
-
Method Summary
Modifier and Type Method Description final BetaResponseToolAdditionBlock.Tooltool()The tool made available: a reference to a toolsentry or MCP toolset, or atool_definitioncarrying the definition by value.final BetaRequestToolAdditionBlocktoParam()final JsonValue_type()Expected to always return the following:
However, this method can be useful for debugging and logging (e.g.JsonValue.from("tool_addition")final JsonField<BetaResponseToolAdditionBlock.Tool>_tool()Returns the raw JSON value of tool. final Map<String, JsonValue>_additionalProperties()final BetaResponseToolAdditionBlock.BuildertoBuilder()final BetaResponseToolAdditionBlockvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaResponseToolAdditionBlock.Builderbuilder()Returns a mutable builder for constructing an instance of BetaResponseToolAdditionBlock. final static BetaResponseToolAdditionBlockof(BetaResponseToolAdditionBlock.Tool tool)Returns an immutable instance of BetaResponseToolAdditionBlock with the required tool set to the given value. final static BetaResponseToolAdditionBlockof(BetaResponseToolChangeToolReference reference)Alias for calling of with Tool.ofReference(reference).final static BetaResponseToolAdditionBlockof(BetaResponseToolChangeMcpToolReference mcpToolReference)Alias for calling of with Tool.ofMcpToolReference(mcpToolReference).final static BetaResponseToolAdditionBlockof(BetaResponseToolChangeMcpToolsetReference mcpToolsetReference)Alias for calling of with Tool.ofMcpToolsetReference(mcpToolsetReference).final static BetaResponseToolAdditionBlockof(BetaToolChangeToolDefinition definition)Alias for calling of with Tool.ofDefinition(definition).-
-
Method Detail
-
tool
final BetaResponseToolAdditionBlock.Tool tool()
The tool made available: a reference to a
toolsentry or MCP toolset, or atool_definitioncarrying the definition by value.
-
toParam
final BetaRequestToolAdditionBlock toParam()
-
_type
final JsonValue _type()
Expected to always return the following:
JsonValue.from("tool_addition")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_tool
final JsonField<BetaResponseToolAdditionBlock.Tool> _tool()
Returns the raw JSON value of tool.
Unlike tool, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaResponseToolAdditionBlock.Builder toBuilder()
-
validate
final BetaResponseToolAdditionBlock validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaResponseToolAdditionBlock.Builder builder()
Returns a mutable builder for constructing an instance of BetaResponseToolAdditionBlock.
The following fields are required:
.tool()
-
of
final static BetaResponseToolAdditionBlock of(BetaResponseToolAdditionBlock.Tool tool)
Returns an immutable instance of BetaResponseToolAdditionBlock with the required tool set to the given value.
-
of
final static BetaResponseToolAdditionBlock of(BetaResponseToolChangeToolReference reference)
Alias for calling of with
Tool.ofReference(reference).
-
of
final static BetaResponseToolAdditionBlock of(BetaResponseToolChangeMcpToolReference mcpToolReference)
Alias for calling of with
Tool.ofMcpToolReference(mcpToolReference).
-
of
final static BetaResponseToolAdditionBlock of(BetaResponseToolChangeMcpToolsetReference mcpToolsetReference)
Alias for calling of with
Tool.ofMcpToolsetReference(mcpToolsetReference).
-
of
final static BetaResponseToolAdditionBlock of(BetaToolChangeToolDefinition definition)
Alias for calling of with
Tool.ofDefinition(definition).
-
-
-
-