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

# Tool Call Data • Rust AI Agent SDK

> ToolCallData: Tool call data for streaming events.

# ToolCallData

> Defined in the [**streaming**](../modules/streaming) module.

<Badge color="orange">Rust AI Agent SDK</Badge>

Tool call data for streaming events.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph LR
    agent["Agent"] -- "uses" --> tool["Tool: ToolCallData"]
    tool -- "returns" --> result["Result"]
    style tool fill:#189AB4,color:#fff
    style agent fill:#8B0000,color:#fff
    style result fill:#8B0000,color:#fff
```

## Fields

| Name        | Type                   | Description                   |
| ----------- | ---------------------- | ----------------------------- |
| `name`      | `String`               | Tool name                     |
| `arguments` | `String`               | Tool arguments (partial JSON) |
| `id`        | `Option&lt;String&gt;` | Tool call ID                  |
| `index`     | `Option&lt;usize&gt;`  | Index in the tool calls array |

## Methods

### `new`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn new(name: impl Into<String>) -> Self
```

Create new tool call data

**Parameters:**

| Name   | Type                      |
| ------ | ------------------------- |
| `name` | `impl Into&lt;String&gt;` |

### `arguments`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn arguments(mut self, args: impl Into<String>) -> Self
```

Set arguments

**Parameters:**

| Name   | Type                      |
| ------ | ------------------------- |
| `args` | `impl Into&lt;String&gt;` |

### `id`

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
fn id(mut self, id: impl Into<String>) -> Self
```

Set ID

**Parameters:**

| Name | Type                      |
| ---- | ------------------------- |
| `id` | `impl Into&lt;String&gt;` |

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-rust/praisonai/src/streaming/mod.rs#L78">
  `praisonai/src/streaming/mod.rs` at line 78
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Tools" icon="wrench" href="/docs/rust/tools" />

  <Card title="Rust Code Execution" icon="terminal" href="/docs/rust/code-execution" />

  <Card title="Rust Web Search" icon="search" href="/docs/rust/web-search" />
</CardGroup>
