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;
    toolName?: string;
    toolType?: ToolType;
}

Properties

args?: Record<string, unknown>

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

id?: string

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

toolName?: string

Optional. The name of the tool that was called. This field is not supported in Vertex AI.

toolType?: ToolType

Optional. The type of tool that was called.