Tool results

ToolResultTable

Render tabular tool results as a sortable, zebra-striped table. Columns auto-derive from the first row's keys, or pass an explicit columns config with labels, alignment, and formatters.

Sourcesrc/components/ai/tool-result-table.tsx

Auto-derived columns

Pass any array of objects — columns are derived from the first row's keys. Numeric columns right-align and use tabular-nums automatically.

Benchmark — summarise 8k tokens
gpt-4o12,8403,120842
claude-sonnet-4-612,8402,984612
gemini-2.5-pro12,8403,4021,104

Explicit columns + formatter

Pass a columns config for custom labels, alignment, and per-cell formatters (e.g. currency, badges).

search_flights(SFO→NRT, 2026-05-12)
ANA$1,28411.5h
United$98211.2h
Delta$1,10414.8h
Japan Airlines$1,32011.4h

Empty state

Pass emptyLabel to customise the placeholder when the agent's tool call returned zero rows.

search_issues(label:bug, status:open)
No open bugs — you're all caught up.