See the integration example to compose these components with your application's model and data.
Props
getToolCallPresentation (function)
Maps supplied tool lifecycle without inferring that ready arguments have started execution.
ToolCall
Displays supplied tool activity. The application owns execution and its state.
Prop
Type
Default
Description
titlerequired
ReactNode
Name of the application-owned tool operation.
state
ToolCallState
"queued"
statusLabel
string
More precise supplied progress, for example approval or input preparation.
input
ReactNode
Strings and numbers are rendered as plain preformatted text. Format objects before passing them.
output
ReactNode
error
string
defaultOpen
boolean
false
onOpenChange
(open: boolean) => void
Also accepts Omit<DetailsHTMLAttributes<HTMLDetailsElement>, "title">.
The ref reaches HTMLDetailsElement.
Keyboard
Keys
Does
Tab
Focuses the native disclosure summary and any interactive content when expanded.
Enter, Space
Requests expansion or collapse through the browser's native summary behavior.
Accessibility
The native details and summary expose expansion state. The summary has a 44px minimum target and visible focus outline.
The decorative 16px chevron points right when closed and down when open. Forced colors retain a system color outline and readable controls.
State is visible text in a polite status; error text has an alert role. No color is needed to distinguish states.
Strings and numbers are rendered as escaped preformatted text. Empty strings and zero are retained; React nodes remain application-rendered content.
open is authoritative when controlled; onOpenChange reports requested changes. defaultOpen sets the initial uncontrolled state. The ref reaches details and native attributes pass through.
The component displays the supplied execution state and never runs a tool itself.
Markup
The same styles are available as CSS. Native HTML provides the static presentation; React or application code supplies state updates and actions.