ToolResponseContent
Tool/function execution response returned to the LLM with result data and optional API metadata.Import
Type Definition
Fields
string
required
Must be
"tool-response".number
required
Zero-based index matching the tool call. Minimum: 0.
string
required
Identifier matching the corresponding tool call
id.string
required
Name of the function that was called.
string
required
JSON-encoded string of the function result.
{ statusCode?: number } | null
Optional API response metadata with HTTP status code.
Example
Related
- ToolCallContent — the corresponding request that triggers a tool response
- MessageContent — union type that includes
ToolResponseContent - ToolFunction — defines the tool schema for function calling