Tool Result

Terminal Output

tool-result.tsx
Running

Request Result

tool-result.tsx
Preparing request…
Running

API Reference

ToolResultOutput

language?
"text" | "bash" | "diff" | "json" | "tsx" | "typescript"
Defaultbash
className?
string
Default—

ToolResult

tool
ReactNode
Default—
title
ReactNode
Default—
status?
"error" | "running" | "success" | "cancelled"
Defaultrunning
kind?
"custom" | "terminal" | "request"
Defaultcustom
meta?
ReactNode
Default—
icon?
ReactNode
Default—
open?
boolean
Default—
defaultOpen?
boolean
Defaulttrue
onOpenChange?
((open: boolean) => void)
Default—
collapseOnComplete?
boolean
Defaulttrue
maxHeight?
number
Default220
copyText?
string
Default—
onCopy?
(() => void | Promise<void>)
Default—
onRetry?
(() => void)
Default—
className?
string
Default—
contentClassName?
string
Default—

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @beui/tool-result

Composition

Use the output primitive for terminal text, request details, generated code, or another structured result.

ToolResult
└── ToolResultOutput

Note: Tool Approval collects permission before the execution begins. Code Block renders highlighted code returned by a tool. Agent Activity summarizes the tool invocation within a longer run.

How it works

A tool result is evidence from an execution, not another chat bubble. It should connect a compact run summary to the output needed for inspection, recovery, or reuse.

Also on React Native. Output that streams in, then folds into a result.

Updated