Skip to content
Back

Tool Call CardPro

An agent's tool call in one line: live timer, status and summary; folds open to highlighted arguments and result with copy, Retry on errors, and a group that sums them up.

oxyn add tool-call-card
Arguments
{
  "query": "usage-based pricing pages",
  "limit": 5,
  "site": [
    "stripe.com",
    "vercel.com"
  ]
}
Result
{
  "results": [
    {
      "title": "Stripe Billing pricing",
      "url": "https://stripe.com/billing/pricing",
      "score": 0.94
    },
    {
      "title": "Vercel pricing",
      "url": "https://vercel.com/pricing",
      "score": 0.91
    },
    {
      "title": "Linear pricing",
      "url": "https://linear.app/pricing",
      "score": 0.88
    },
    {
      "title": "Notion pricing",
      "url": "https://notion.so/pricing",
      "score": 0.81
    },
    {
      "title": "Figma pricing",
      "url": "https://figma.com/pricing",
      "score": 0.77
    }
  ],
  "took_ms": 1180
}
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • An agent's tool call in one line: a tile with the kind icon, the tool name in mono, a summary that truncates, a live timer while running (from started) or the final duration, and the status (spinner, check, Failed).
  • The header folds the card open to arguments and result, pretty-printed and lightly tinted (keys, strings, numbers, literals) with copy buttons; JSON strings are parsed, other text stays plain; while running without a result it reads “Waiting for result…”.
  • Code is capped at max_code px with a fade and Show all.
  • A failed call opens itself (unless toggled by hand) and shows the error with Retry; a retry closes the auto-opened card.

When not to use

  • An agent asks before it acts: use Approval Card instead.
  • Several open requests in one card: use Approval pager instead.
  • An agent's question in its own card above the composer: use Decision Card instead.

Installation

Tool Call Card is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add tool-call-card

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Result

Success, open on arguments and a capped result with Show all.

Arguments
{
  "query": "usage-based pricing pages",
  "limit": 5,
  "site": [
    "stripe.com",
    "vercel.com"
  ]
}
Result
{
  "results": [
    {
      "title": "Stripe Billing pricing",
      "url": "https://stripe.com/billing/pricing",
      "score": 0.94
    },
    {
      "title": "Vercel pricing",
      "url": "https://vercel.com/pricing",
      "score": 0.91
    },
    {
      "title": "Linear pricing",
      "url": "https://linear.app/pricing",
      "score": 0.88
    },
    {
      "title": "Notion pricing",
      "url": "https://notion.so/pricing",
      "score": 0.81
    },
    {
      "title": "Figma pricing",
      "url": "https://figma.com/pricing",
      "score": 0.77
    }
  ],
  "took_ms": 1180
}
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Running

Live timer and Waiting for result…; settles after 2.6 s.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Error

Failed: opened on error, Retry runs it again.

Arguments
{
  "query": "usage-based pricing pages",
  "limit": 5,
  "site": [
    "stripe.com",
    "vercel.com"
  ]
}
Request timed out after 3.0s (search provider 504)
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Group

A group header that sums the calls (shimmers while one runs).

Arguments
{
  "query": "usage-based pricing pages",
  "limit": 5,
  "site": [
    "stripe.com",
    "vercel.com"
  ]
}
2 tests failed: proration_rounds_down, refunds_cap
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

ToolCallCard

PropTypeDefaultDescription
cardrequiredCallCard—Card state.
nowrequiredClockMs—Shared clock.
iconString"tool"Icon in the tile.
max_codeu32220Code height cap, px.
on_toggleEventHandler<()>—Header toggled.
on_retryOption<EventHandler<()>>Default::default()Retry pressed (shows the button).

ToolCallGroup

PropTypeDefaultDescription
cardsrequiredVec<CallCard>—Cards.
nowrequiredClockMs—Shared clock.
openbooltrueOpen.
on_openEventHandler<bool>—Header toggled.
on_toggleEventHandler<usize>—A card toggled.
on_retryEventHandler<usize>—Retry a card.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabHeader, copy buttons, Retry, Show all
EnterorSpaceOpen or close the card or the group

Accessibility

  • The header is a button with aria-expanded; status is text (Failed, a check with its duration).
  • Copy buttons are named Copy arguments / Copy result.
From the spec
  • Header button with aria-expanded; statuses are text.
  • Copy buttons named Copy arguments / Copy result; the clipboard text is in data-copy for the host.

Motion & interaction

Timing
  • The body rises 5 px in over 200 ms; the chevron turns on the same curve.
  • The group label shimmers while any call runs and settles to solid.
  • Reduced motion: no entrance rise or row stagger, no shimmer (static muted text), chevrons and the card morph jump to their end state.

Responsive behaviour

  • The summary truncates first; name, status and time keep their width.
Edge cases (spec)
  • Summary truncates first; name, status and time keep their width.

Notes for AI

  • Import ToolCallCard, ToolCallGroup from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: ToolCallCardEl in oxyn_gpui.
  • Props to set first: card, now, cards, now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI