Skip to content

ToolCall

ToolCall(__namedParameters): ReactElement

Defined in: react/components/agent/tool-call.tsx:70

A collapsible tool-call card for agent transcripts: a one-line header with a status badge, the tool name, a dimmed argument preview, and (while collapsed) a result summary — clicking the header reveals the full result body below.

Works controlled (pass open + onToggle) or uncontrolled (defaultOpen). The body stays mounted while collapsed, so a streaming result keeps updating behind the fold. Compose it with Diff, Syntax, Markdown, or plain text.

<ToolCall name="Read" args="src/app.ts" status="success" summary="120 lines">
<Syntax language="ts">{fileText}</Syntax>
</ToolCall>

ToolCallProps

ReactElement