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.
{
"tool": "EQ-07",
"metric": "chamber_pressure",
"window": "24h",
"rule": "we_rule_2"
}{
"violations": 3,
"first_at": "02:14",
"trend": "rising",
"peak_mtorr": 12.4
}Installation
Props
| Prop | Type | Description |
|---|---|---|
| name | string | The tool / function name |
| args | unknown | Arguments, shown as formatted JSON |
| result | unknown | Return value or error payload |
| status | ToolStatus | pending, running, success, or error |
| durationMs | number | Execution time |
| defaultOpen | boolean | Start expanded |
| icon | React.ReactNode | Custom 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.