Launch priceOne payment

Tool Call

Closed, it is one line you can scan: the action in plain words, the tool's real name, and the one fact it found. Open, it is the evidence, with input and output as coloured JSON, a Copy on each block, and long results cut with Show all.

AI AgentFree342 lines · one file

Ready for AI tools one file typed props installs by name prompt included

The decision inside it

A label for people, a name for debugging

"Read the audit trail" is what a person reads; `audit.list_events` sits beside it in small type for whoever has to trace it. Neither replaces the other.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Layro's Tool Call for this.
Install it: npx shadcn@latest add https://layropro.com/r/tool-call
Import it from @/components/ui/tool-call.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above.

API

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
namerequiredstringThe tool's real name: `email.send`.
labelReact.ReactNodeWhat it did, in plain words. Defaults to the name.
iconReact.ReactNode—
statusrequiredToolStatus—
summaryReact.ReactNodeThe one fact worth reading while it is closed.
inputunknownWhat was sent. An object is shown as JSON.
outputunknownWhat came back: an object, a string, or a node to render as it is.
errorReact.ReactNodeWhy it failed. Shown when `status` is `error`, and opens the card.
durationnumber | stringMilliseconds as a number, or your own text.
defaultOpenboolean—
openboolean—
onOpenChange(open: boolean) => void—
onRetry() => void—
maxLinesnumberLines of a block shown before "Show all". Default 12.

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Layro foundations, installed alongside it

layro-themebutton

Lifetime access

Every component, and everything we ship next.

  • All 112 components, source included
  • The template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.

More in AI Agent

All AI Agent components