Components / Reasoning / Tool
Tool
A collapsible tool-call card showing its state, input, output, or error.
Installation
Install the Tool React component with the shadcn CLI (after adding the @ai-primitive registry and theme, see Installation):
npx shadcn@latest add @ai-primitive/tool
Usage
import { Tool } from "@/components/ui/tool"
Related components
- Reasoning - A collapsible "thinking" block that auto-opens while streaming and closes when done.
- Chain of Thought - A vertical trail of collapsible reasoning steps, connected by a line.
- Steps - A collapsible, numbered list of completed steps with a side rail.
- Source - An inline citation chip that opens a hover card with the linked page's details.