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

# ToolCallContent

> Tool/function call request from LLM with arguments and metadata.

# ToolCallContent

Tool/function call request from an LLM with arguments and metadata.

## Import

```typescript theme={null}
import type { ToolCallContent } from '@adaline/api';
```

## Type Definition

```typescript theme={null}
interface ToolCallContent {
  modality: 'tool-call';
  index: number;
  id: string;
  name: string;
  arguments: string;
  serverName?: string | null;
}
```

## Fields

**modality** `string` *required*

Must be `"tool-call"`.

**index** `number` *required*

Zero-based index of the tool call. Minimum: 0.

**id** `string` *required*

Unique identifier for this tool call.

**name** `string` *required*

Name of the function to call.

**arguments** `string` *required*

JSON-encoded string of function arguments.

**serverName** `string | null`

Optional MCP server name associated with this tool call.

***

## Example

```typescript theme={null}
import type { ToolCallContent, PromptMessage } from '@adaline/api';

const toolCall: ToolCallContent = {
  modality: 'tool-call',
  index: 0,
  id: 'call_abc123',
  name: 'get_weather',
  arguments: JSON.stringify({
    city: 'San Francisco',
    units: 'fahrenheit'
  }),
  serverName: 'weather-api'
};

const message: PromptMessage = {
  role: 'assistant',
  content: [toolCall]
};
```

**JSON**:

```json theme={null}
{
  "modality": "tool-call",
  "index": 0,
  "id": "call_abc123",
  "name": "get_weather",
  "arguments": "{\"city\":\"San Francisco\",\"units\":\"fahrenheit\"}"
}
```

***

## Related

* [ToolResponseContent](https://www.adaline.ai/docs/reference/sdk/v2/typescript/types/ToolResponseContent.md) — the corresponding response for a tool call
* [MessageContent](https://www.adaline.ai/docs/reference/sdk/v2/typescript/types/MessageContent.md) — union type that includes `ToolCallContent`
* [ToolFunction](https://www.adaline.ai/docs/reference/sdk/v2/typescript/types/ToolFunction.md) — defines the tool schema that produces tool calls


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