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

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

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

<ParamField body="id" type="string" required>
  Unique identifier for this tool call.
</ParamField>

<ParamField body="name" type="string" required>
  Name of the function to call.
</ParamField>

<ParamField body="arguments" type="string" required>
  JSON-encoded string of function arguments.
</ParamField>

<ParamField body="serverName" type="string | null" optional>
  Optional MCP server name associated with this tool call.
</ParamField>

***

## 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](/docs/reference/sdk/v2/typescript/types/ToolResponseContent) — the corresponding response for a tool call
* [MessageContent](/docs/reference/sdk/v2/typescript/types/MessageContent) — union type that includes `ToolCallContent`
* [ToolFunction](/docs/reference/sdk/v2/typescript/types/ToolFunction) — defines the tool schema that produces tool calls
