React Tool-Call Card

One function call an agent made, rendered so a human can check it: the tool, the arguments it passed, what came back, how long it took, and whether it worked. Arguments and result are formatted JSON on Kelvin's deep surface, collapsed by default so a long trace stays scannable.

Arguments
{
  "tool": "EQ-07",
  "metric": "chamber_pressure",
  "window": "24h",
  "rule": "we_rule_2"
}
Result
{
  "violations": 3,
  "first_at": "02:14",
  "trend": "rising",
  "peak_mtorr": 12.4
}

Installation

npx shadcn@latest add "https://kelvinui.com/registry/tool-call-card.json"

Props

PropTypeDescription
namestringThe tool / function name
argsunknownArguments, shown as formatted JSON
resultunknownReturn value or error payload
statusToolStatuspending, running, success, or error
durationMsnumberExecution time
defaultOpenbooleanStart expanded
iconReact.ReactNodeCustom glyph for the tool

Auditable by default

An agent that calls tools is a program writing its own function calls, and the only way to trust it is to be able to read them. The card treats a call the way a debugger treats a stack frame: name and status always visible, arguments and result one click away. args and result accept anything — an object is pretty-printed as JSON, a string is shown verbatim — so it handles both a structured API call and a free-text tool. An error status recolours the result panel red and labels it Error, because a failed call that looks like a successful one is how a broken agent hides.

This is the leaf that Agent / Tool-Call Trace composes into a full run, but it stands alone anywhere you need to show a single function call — a webhook log, a debugger, an audit record.

New components every week

Get the week's new Kelvin UI components and templates in one short email. No spam, unsubscribe anytime.