Interface BetaCompactionBlock.ToolChange.Visitor
-
- All Implemented Interfaces:
public interface BetaCompactionBlock.ToolChange.Visitor<T extends Object>An interface that defines how to map each variant of ToolChange to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitAddition(BetaResponseToolAdditionBlock addition)An 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.abstract TvisitRemoval(BetaResponseToolRemovalBlock removal)An entry of a compactionblock'stool_changes: a tool of the request'stools(or an MCP tool or toolset) that the compacted range withdrew.Tunknown(JsonValue json)Maps an unknown variant of ToolChange to a value of type T. -
-
Method Detail
-
visitAddition
abstract T visitAddition(BetaResponseToolAdditionBlock addition)
An 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.
-
visitRemoval
abstract T visitRemoval(BetaResponseToolRemovalBlock removal)
An entry of a
compactionblock'stool_changes: a tool of the request'stools(or an MCP tool or toolset) that the compacted range withdrew. Send it back unchanged.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of ToolChange to a value of type T.
An instance of ToolChange 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.
-
-
-
-