> ## 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

**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

```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](https://www.adaline.ai/docs/reference/sdk/v2/python/types/ToolCallContent.md) — the corresponding tool call request
* [MessageContent](https://www.adaline.ai/docs/reference/sdk/v2/python/types/MessageContent.md) — union wrapper for all content types
* [PromptMessage](https://www.adaline.ai/docs/reference/sdk/v2/python/types/PromptMessage.md) — chat message containing content arrays


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.