GitHubnpm

Accent theme

Base radius

GitHubnpm

Accent theme

Base radius

Colour scheme

Docs menu

Guides


Primitives
Forms
Layout
Feedback
Overlays
Navigation
Data Display
AI

Tool Call

A collapsible agent tool-invocation status — web search, file reads, code runs — on real <details>/<summary>, the same foundation as Reasoning. Compose results with Sources or any other content.

Searching "JWT auth vulnerabilities"

    Examples

    Searching

    Running state shimmers the label while results populate underneath.

    Searching "JWT auth vulnerabilities"
      Usage
      <ToolCall
        label={'Searching "JWT auth vulnerabilities"'}
        status="running"
        defaultOpen
      >
        <Sources heading={null}>…</Sources>
      </ToolCall>

      Complete

      Settled checkmark once the tool finishes; still expandable.

      Usage
      <ToolCall
        label={'Searched "JWT auth vulnerabilities"'}
        status="complete"
        defaultOpen
      >
        <Sources heading={null}>
          <Source title="JWT verification best practices" href="…" />
        </Sources>
      </ToolCall>

      Status only

      Without children, ToolCall is a non-collapsible status row.

      Reading src/auth.ts
      Usage
      <ToolCall label="Reading src/auth.ts" status="complete" />

      Playground

      Toggle every adjustable prop and watch the component — and the code — update live.

      Unstyled

      Same component — Kernel look stripped. See Platforms.

      status
      defaultOpen
      results
      Usage
      <ToolCall label="Searched "JWT auth vulnerabilities"" status="complete" defaultOpen>
        <Sources heading={null}>
          <Source title="JWT verification best practices" href="…" />
        </Sources>
      </ToolCall>

      Props

      Props for Tool Call.
      PropTypeDefault
      labelReactNode (required)
      status"pending" | "running" | "complete" | "error""pending"
      defaultOpenbooleantrue while pending/running
      open / onOpenChangecontrolled open state
      childrenReactNode

      Accessibility

      • Expand/collapse and keyboard support come from native <details> when results are present.
      • The running state announces via role="status", same polite live-region pattern as ThinkingIndicator.
      • Without children, the control is a plain status row — no disclosure control to confuse when there's nothing to expand.
      • Motion (dots + shimmer) freezes under prefers-reduced-motion; the label text still communicates the state.