ToolCall
Loading example…
Collapsible tool invocation with status, JSON arguments and JSON result.
Import
Section titled “Import”import { ToolCall } from "@jcsoftdev/ui/ai";Single-component entry points tree-shake to just this component: @jcsoftdev/ui/ai/tool-call.
<ToolCall name="buscar_turnos" status="done" duration="1,2 s" defaultOpen args={{ fecha: "2026-06-20", barbero: "Diego Quispe" }} result={{ libres: ["10:00", "11:30", "16:00"], total: 3 }}/>| Prop | Type | Default | Description |
|---|---|---|---|
name * |
string |
Tool identifier, e.g. buscar_turnos. |
|
status |
"done" | "error" | "pending" | "running" |
"pending" |
|
args |
unknown |
Arguments sent to the tool; shown as formatted JSON. | |
result |
unknown |
Result returned by the tool; shown as formatted JSON. | |
error |
string |
Error text when status is error. |
|
duration |
string |
Pre-formatted duration, e.g. 1,2 s. |
|
defaultOpen |
boolean |
false |
|
className |
string |
* marks a required prop.
Storybook stories
Section titled “Storybook stories”Source
Section titled “Source”packages/ui/src/ai/tool-call/tool-call.tsx