Agentic
Tool Call
Shows an agent's tool call as one line that opens to its arguments and result, with Retry on errors and Approve or Deny when a call needs a person.
Usage
With the AI SDK
Each tool-<name> part becomes one call, keyed by its toolCallId. Map the part's state to a status, and answer approvals with addToolApprovalResponse.
With TanStack AI
tool-call parts carry id, name, input, output, and state. The docs do not show how an app answers an approval, so wire Approve and Deny to your own handler.
Examples
Failed call
An error opens the call with its message and Retry.
Recommendations
| Guidance | Practice |
|---|---|
| Do | Map each SDK tool part to one call with its toolCallId, and group a turn's calls with ToolCallGroup. Write the title in present tense while running and past tense when complete. |
Usage boundaries
| Guidance | Boundary |
|---|---|
| Scope | The application runs tools and stores approvals. Tool Call shows each call's state; Approve and Deny only report the choice. |
| Scope | Arguments and results render as given. Remove secrets before passing them in. |
API reference
Public props from @mizen-labs/ui. Use exported prop types for the complete TypeScript contract.
| Prop | Type | Default | Description |
|---|---|---|---|
| | — | running while input streams or the tool works, approval while it waits for a person, then complete, error, or denied. Errors and approvals open on their own. |
| | — | The tool's id, shown in monospace. |
| | — | What the call does. Present tense while running, past tense once complete. |
| | — | Arguments and result, shown in code blocks with Copy. Text shows as is; anything else as JSON. |
| | — | An error shows its message with Retry; an approval shows Approve and Deny. Each button appears only with its handler. |
| | Measured | Seconds the call took. Measured while the component watches it run; pass it for a call from history. |
| | — | ToolCallGroup takes calls with an id each. It stays open under Using tools… while they work, then folds into Used 3 tools · 1 failed · 2.7s, unless the reader opened or closed it. |