Tool Call
An Tool Call Component
Examples
Prompt Input Basics
Tools with dfiferent state
Different State during the tool calling, Processing, Completed and Error
Installation
pnpm dlx shadcn@latest add https://chatcn.me/c/tool
Props
Tool
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | - | Tool name to display |
state | "LOADING" | "COMPLETED" | "ERROR" | - | Current state of the tool call |
input | Record<string, unknown> | - | Input parameters passed to the tool |
output | Record<string, unknown> | - | Output from the tool execution |
errorText | string | - | Error message when state is ERROR |
children | React.ReactNode | - | Additional content in the trigger |
ToolStateBadge
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional CSS classes |