One tool call of a chat answer, folded under a row with the tool's name and its state. Open it to read what the model sent the tool and what came back.
When to use
- Show a tool that a model called while it answered, inside a chat message.
- Use Reasoning for the reasoning the model wrote.
- Use Work to fold every step of one answer under one "Show work" toggle.
- Prefer Accordion for titled sections that are not part of a chat answer.
States
status takes four values, and the row shows an icon and a word for each. A call is running until its result arrives, then done, or failed when the tool returned an error. Set interrupted when the answer ended, by a stop or a failure, before the result arrived.
Composition
Polymorphism
ToolCall.Name takes asChild. The other parts do not: each renders more than one element, or an element beside its children.
Translation
ToolCall.Name sets translate="no", because a tool's name is an identifier. ToolCall.Trigger renders an icon, the state, and a caret beside its children. The children sit in a display: contents wrapper, data-slot="tool-call-trigger-label", so a page that a browser translates survives a change to them.
API Reference
ToolCall.Root
The tool call disclosure. It starts closed.
All props from div, plus:
ToolCall.Trigger
The disclosure row shows a state icon, its children, a state label, and a caret.
All props from button except type.
ToolCall.Name
The tool's name in code type. It never translates.
All props from code except translate, plus:
ToolCall.Content
What the model sent the tool and what came back, such as two CodeBlocks. The children stack with a small gap.
All props from div.