Skip to main content

ToolResponseContent

Tool/function execution response returned to the LLM.

Fields

modality
str
required
Must be "tool-response".
index
int
required
Zero-based index matching the tool call. Minimum: 0.
id
str
required
Identifier matching the tool call id.
name
str
required
Name of the function that was called.
data
str
required
JSON-encoded string of the function result.
api_response
ToolResponseContentApiResponse | None
Optional API response metadata with status_code. Aliased as apiResponse in JSON.

Example

JSON: