ToolResponse

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

The output from a server-side ToolCall execution.

This message contains the results of a tool invocation that was initiated by a ToolCall from the model. The client should pass this ToolResponse back to the API in a subsequent turn within a Content message, along with the corresponding ToolCall.

Constructors

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

Properties

Link copied to clipboard
val id: String? = null

The identifier of the tool call this response is for.

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

The tool response.

Link copied to clipboard
val toolType: ToolType? = null

The type of tool that was called, matching the tool_type in the corresponding ToolCall.