# ToolCall

> Animated single or multi-step tool activity.

## Install

```bash
npx shadcn@latest add https://crate.onerollstudios.com/r/tool-call.json
```

## Import

```tsx
import { ToolCall } from "@/components/agent-wait-states/tool-call";
```

## Props

| Prop | Type | Required | Default | Notes |
| --- | --- | --- | --- | --- |
| `className` | `string` | no |  |  |
| `accent` | `boolean` | no | `false` |  |
| `labels` | `Partial<CrateLabels>` | no |  | Replace any of this component's labels. Overrides CrateProvider. |
| `steps` | `ToolStep[]` | no |  |  |
| `toolName` | `string` | no |  |  |
| `label` | `string` | no |  |  |
| `done` | `boolean` | no | `false` | The call has finished: every step shows as complete, and the default label says "Used". |

## Labels

Override with the `labels` prop or a `CrateProvider`.

| Label | English default |
| --- | --- |
| `usedTool` | `` (toolName) => `Used ${toolName}` `` |
| `usedToolUnnamed` | `"Used a tool"` |
| `runningTool` | `` (toolName) => `Running ${toolName}…` `` |
| `runningToolUnnamed` | `"Running a tool…"` |
| `toolActivity` | `"Agent tool activity"` |

## Types

```ts
export type ToolStep = { id?: string; label: string; toolName?: string; state?: "pending" | "active" | "complete" };
```

## Example

```tsx
<ToolCall steps={toolSteps} accent />
```
