Interface BetaRequestToolAdditionBlock.Tool.Visitor
-
- All Implemented Interfaces:
public interface BetaRequestToolAdditionBlock.Tool.Visitor<T extends Object>
-
-
Method Summary
Modifier and Type Method Description abstract TvisitReference(BetaToolChangeToolReference reference)Reference to a single tool, by the name the model uses to call it: a tool declared in `tools`or defined by an earlier`tool_addition`block.abstract TvisitMcpToolReference(BetaToolChangeMcpToolReference mcpToolReference)Reference to a single MCP tool by its server and remote name; the same `server_name`/`name`pair`mcp_tool_use`carries.abstract TvisitMcpToolsetReference(BetaToolChangeMcpToolsetReference mcpToolsetReference)Reference to every tool in the named MCP server's toolset. abstract TvisitDefinition(BetaToolChangeToolDefinitionParam definition)A tool defined by value: definitionis atoolsentry (any kindtoolsaccepts, an MCP toolset included).Tunknown(JsonValue json)Maps an unknown variant of Tool to a value of type T. -
-
Method Detail
-
visitReference
abstract T visitReference(BetaToolChangeToolReference reference)
Reference to a single tool, by the name the model uses to call it: a tool declared in
`tools`or defined by an earlier`tool_addition`block. Does not accept the composed`{server}_{name}`form the server assigns to MCP-resolved tools; use`mcp_tool_reference`or`mcp_toolset_reference`for those.
-
visitMcpToolReference
abstract T visitMcpToolReference(BetaToolChangeMcpToolReference mcpToolReference)
Reference to a single MCP tool by its server and remote name; the same
`server_name`/`name`pair`mcp_tool_use`carries.
-
visitMcpToolsetReference
abstract T visitMcpToolsetReference(BetaToolChangeMcpToolsetReference mcpToolsetReference)
Reference to every tool in the named MCP server's toolset.
-
visitDefinition
abstract T visitDefinition(BetaToolChangeToolDefinitionParam definition)
A tool defined by value:
definitionis atoolsentry (any kindtoolsaccepts, an MCP toolset included). Anmcp_toolsetgiven here also requires themcp-client-2026-09-15beta.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of Tool to a value of type T.
An instance of Tool can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-