A full tool call showing the request the assistant made and the result it got back — an identity header over the Arguments and Response panels.
Loading demo: tool-call-card-real-world
npx sdaia-ui@latest add tool-call-card
import { ToolCallCard } from '@/components/ui/ToolCallCard';1<ToolCallCard2variant="brand"3name="search_web"4subtitle="Search tools server · MCP"5request={{6label: "Arguments",7lines: ['query: "SDAIA data strategy 2030"', "locale: ar-SA · limit: 12"],8}}9response={{10label: "Response",11lines: ["12 trusted sources found", "top relevance: 94%"],12}}13/>
Brand-tinted surface with a brand border — for a call worth highlighting.
Loading demo: tool-call-card-brand
A raised surface with a default border — the quiet default.
Loading demo: tool-call-card-neutral
A transparent surface with a default border.
Loading demo: tool-call-card-outline
Prop | Type | Default | Required |
|---|---|---|---|
variant | 'brand' | 'neutral' | 'outline' | 'neutral' | optional |
name | ReactNode | — | required |
subtitle | ReactNode | — | optional |
request | ToolCallPanel | — | optional |
response | ToolCallPanel | — | optional |
icon | string | wrench02Stroke | optional |
showIcon | boolean | true | optional |
headerEnd | ReactNode | — | optional |
dir | 'ltr' | 'rtl' | — | optional |
labels | Partial<ToolCallCardLabels> | — | optional |
as | ElementType | 'div' | optional |
How this component behaves at the three system breakpoints. Spacing and type tokens switch automatically at 768px and 1280px.
| Screen | Behavior |
|---|---|
| Desktop (1280px and up) | Fills the width of its container, with the request and response panels side by side. |
| Tablet (768–1279px) | Same layout as desktop, with the tablet token values. |
| Phone (under 768px) | From 640px the panels stay side by side. Below 640px they stack, each at full width. Panel text wraps, including long words. |