Interface ToolCall

A predicted server-side ToolCall returned from the model.

This message contains information about a tool that the model wants to invoke. The client is NOT expected to execute this ToolCall. Instead, the client should pass this ToolCall back to the API in a subsequent turn within a Content message, along with the corresponding ToolResponse.

interface ToolCall {
    args?: Record<string, unknown>;
    id?: string;
    toolType?: ToolType;
}

Properties

Properties

args?: Record<string, unknown>

The tool call arguments. Example: {"arg1": "value1", "arg2": "value2"}.

id?: string

Unique identifier of the tool call. The server returns the tool response with the matching id.

toolType?: ToolType

The type of tool that was called.