npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-tool-call.json --yesTool call
ProOne tool call of an assistant's run, as a quiet row that opens onto its input and output, for React and Tailwind CSS. Part of Goop Pro.
What an agent sees
import { Steps } from '@/components/ui/goop/steps';
import { ToolCall } from '@/components/ui/goop/tool-call';
function Steps() {
return (
<div className="flex w-96 flex-col gap-0.5">
<ToolCall
name="search_sites"
state="done"
summary="Found 3 sites"
input={{ query: 'dental surgeries', near: 'Leeds', limit: 3 }}
output={'Station Road Surgery\nKirkgate Dental\nHyde Park Practice'}
/>
<ToolCall name="book_rooms" state="running" summary="Booking 2 rooms" input={{ sites: [1, 3] }} />
</div>
);
}When to use
- One tool call of an assistant's run, as a quiet row that opens onto its input and output.
Installation
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Tool call on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-tool-call.json --yesAdd the Goop Tool call to this project. The install steps are at https://goop.so/docs/install.mdUsage
import { Steps } from '@/components/ui/goop/steps';
import { ToolCall } from '@/components/ui/goop/tool-call';
function Steps() {
return (
<div className="flex w-96 flex-col gap-0.5">
<ToolCall
name="search_sites"
state="done"
summary="Found 3 sites"
input={{ query: 'dental surgeries', near: 'Leeds', limit: 3 }}
output={'Station Road Surgery\nKirkgate Dental\nHyde Park Practice'}
/>
<ToolCall name="book_rooms" state="running" summary="Booking 2 rooms" input={{ sites: [1, 3] }} />
</div>
);
}- Fits: chat (its recipe).
- A run's tool calls stand one under the other in the answer's column, under the question and before the answer's words, each its own ToolCall 2 px apart (the theme's item rows' step). A call that waits for a person's yes is an ApprovalRequest, with the call's input as its details.
- width, padding, gap, text: add no class for these.
API reference
| Option | Type | What it does |
|---|---|---|
| name | string | The tool's name as the agent calls it (search_sites), shown in the theme's mono. |
| state | 'running' | 'done' | 'failed' | Where the call is: running, done or failed. |
| summary? | string | One line on what the call did ("Found 3 sites"), after the name in grey, cut with an ellipsis. |
| input? | unknown | What the tool was given: a string as it is, anything else (the call's arguments) as JSON on two spaces. |
| output? | unknown | What the tool gave back (its error when failed), drawn as input is. |
| open? | boolean | The body shown (controlled); pair it with onOpenChange. |
| defaultOpen? | boolean = false | The body shown on the first paint (uncontrolled). |
| onOpenChange? | (open: boolean) => void | Called with the new open state when the row is pressed. |
| labels? | Partial<ToolCallLabels> | The words it says, any of them replaced: the states', the body's headings, its waiting and empty lines. |
- State: open (open / defaultOpen / onOpenChange)
- Types: ToolCallLabels = { running: string; done: string; failed: string; input: string; output: string; error: string; waiting: string; empty: string }
- data-slot values (to select a part by): tool-call, tool-call-body, tool-call-description, tool-call-group, tool-call-icon, tool-call-label, tool-call-message, tool-call-status, tool-call-title
Keyboard
| Key | What it does |
|---|---|
| Enter Space | Open or close the call's body, its input and its output (aria-expanded says which) |
| Tab | Move from the row to the copy buttons of a shown body's code blocks, then on to the next call |
Accessibility
- The part itself answers the keys above.
- hover, active, focus-visible: the browser's own (:hover, :active, :focus-visible): write nothing
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.