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.
Source
src/components/ai/tool-result-table.tsxAuto-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-4o | 12,840 | 3,120 | 842 |
| claude-sonnet-4-6 | 12,840 | 2,984 | 612 |
| gemini-2.5-pro | 12,840 | 3,402 | 1,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,284 | 11.5h | ✓ |
| United | $982 | 11.2h | ✓ |
| Delta | $1,104 | 14.8h | ✗ |
| Japan Airlines | $1,320 | 11.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.