Search Documentation

Search for components, guides, and more.

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

PropTypeDefaultDescription
namestring-Tool name to display
state"LOADING" | "COMPLETED" | "ERROR"-Current state of the tool call
inputRecord<string, unknown>-Input parameters passed to the tool
outputRecord<string, unknown>-Output from the tool execution
errorTextstring-Error message when state is ERROR
childrenReact.ReactNode-Additional content in the trigger

ToolStateBadge

PropTypeDefaultDescription
classNamestring-Additional CSS classes