Skip to main content

ToolResponseContent

Tool/function execution response returned to the LLM with result data and optional API metadata.

Import

Type Definition

Fields

modality
string
required
Must be "tool-response".
index
number
required
Zero-based index matching the tool call. Minimum: 0.
id
string
required
Identifier matching the corresponding tool call id.
name
string
required
Name of the function that was called.
data
string
required
JSON-encoded string of the function result.
apiResponse
{ statusCode?: number } | null
Optional API response metadata with HTTP status code.

Example

JSON: