Docs / ToolCall

ToolCall

Animated single or multi-step tool activity.

Install

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

Playground

  1. Running searchDocs…
<ToolCall toolName="searchDocs" />

Import

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

Props

PropTypeRequiredDefaultNotes
classNamestringno
accentbooleannofalse
labelsPartial<CrateLabels>noReplace any of this component's labels. Overrides CrateProvider.
stepsToolStep[]no
toolNamestringno
labelstringno
donebooleannofalseThe call has finished: every step shows as complete, and the default label says "Used".

Labels

Override with the labels prop or a CrateProvider.

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

Types

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

Example

<ToolCall steps={toolSteps} accent />

For coding agents: /llms/tool-call.md, generated from the same source.