> ## Documentation Index
> Fetch the complete documentation index at: https://www.adaline.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ToolResponseContent

# ToolResponseContent

Tool/function execution response returned to the LLM.

```python theme={null}
from adaline_api.models.tool_response_content import ToolResponseContent
```

***

## Fields

<ParamField body="modality" type="str" required>
  Must be `"tool-response"`.
</ParamField>

<ParamField body="index" type="int" required>
  Zero-based index matching the tool call. Minimum: 0.
</ParamField>

<ParamField body="id" type="str" required>
  Identifier matching the tool call `id`.
</ParamField>

<ParamField body="name" type="str" required>
  Name of the function that was called.
</ParamField>

<ParamField body="data" type="str" required>
  JSON-encoded string of the function result.
</ParamField>

<ParamField body="api_response" type="ToolResponseContentApiResponse | None" optional>
  Optional API response metadata with `status_code`. Aliased as `apiResponse` in JSON.
</ParamField>

***

## Example

```python theme={null}
import json
from adaline_api.models.tool_response_content import ToolResponseContent
from adaline_api.models.message_content import MessageContent

tool_response = ToolResponseContent(
    modality="tool-response",
    index=0,
    id="call_abc123",
    name="get_weather",
    data=json.dumps({"temperature": 72, "conditions": "sunny"})
)

content = MessageContent(actual_instance=tool_response)
```

**JSON**:

```json theme={null}
{
  "modality": "tool-response",
  "index": 0,
  "id": "call_abc123",
  "name": "get_weather",
  "data": "{\"temperature\":72,\"conditions\":\"sunny\"}"
}
```

***

## Related

* [ToolCallContent](/docs/reference/sdk/v2/python/types/ToolCallContent) — the corresponding tool call request
* [MessageContent](/docs/reference/sdk/v2/python/types/MessageContent) — union wrapper for all content types
* [PromptMessage](/docs/reference/sdk/v2/python/types/PromptMessage) — chat message containing content arrays
