ToolCall

@Serializable
data class ToolCall(val id: String? = null, val toolType: ToolType? = null, val args: Map<String, JsonElement>? = null)

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.

Constructors

Link copied to clipboard
constructor(id: String? = null, toolType: ToolType? = null, args: Map<String, JsonElement>? = null)

Properties

Link copied to clipboard
val args: Map<String, JsonElement>? = null

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

Link copied to clipboard
val id: String? = null

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

Link copied to clipboard
val toolType: ToolType? = null

The type of tool that was called.