ToolCall

Markdown

A tool request with its input, result, failure and duration.

Used in Action receipts, Agent Workbench and App shells.

Use it for
One tool request with its input, result, failure and duration.
Not for
Several calls of one step. Try ToolGroup.

ToolCall preview

Installation

npm install @stackunseen/ui
import { ToolCall } from '@stackunseen/ui';
Styles: @stackunseen/ui/styles.css

Parts

With only a value, ToolCall draws its summary, input and result for you. Pass the parts as children to choose which show and in what order.

How the parts fit together

tsx
<ToolCall value={call}>
  <ToolCall.Summary />
  <ToolCall.Result />
</ToolCall>
  1. ToolCall

    Holds the call. variant="row" is one line that opens for details.

    Propsvalue variant detail

  2. ToolCall.Summary

    The tool name and a status badge.

    Built fromStatusBadge

  3. ToolCall.Input

    The arguments, collapsed.

    Built fromAccordion

  4. ToolCall.Result

    The output or error, or what happened, such as "Waiting for approval".

    Built fromToolResult, LoadingIndicator

Usage and props

Show a tool request and the result reported by your server. Update value as input arrives or execution changes, and keep an unknown outcome as unknown until your server resolves it. Your server runs the tools and reports what actually happened.

valueToolCallData
The tool id, name, revision, state and input, with optional output, error, durationMs, and a label and target you write, which rows show instead of the name.
variant'card' | 'terminal' | 'compact' | 'row' (optional)
Defaults to card. Row is one line per step (status, label, target, duration) with details on request; messages and Chat use it. Compact keeps execution details behind a disclosure.
childrenReactNode (optional)
Replace the default layout with Summary, Input and Result inside ToolCall.Root.
How state and callbacks work
All props

Loading…

For your coding agent

Give the agent this page instead of a screenshot. The prompt wraps the page with the install and import lines and the rule that your server, not a click, completes an action.

Contract
value: ToolCallData · Root / Summary / Input / Result · detail?
Keeps honest
Your server runs the tools and reports what actually happened.
MCP
read_component "ToolCall" on the docs endpoint
Open the Markdown file

Keyboard and customization

Keyboard

Tab reaches input and execution disclosures. Enter or Space opens them; the input preview supports keyboard reading and scrolling.

Customization

Change shared colors, spacing, corners and icons with the theme. Use the component's supported props to adapt its content and layout. Customization guide and Theme Studio