Tool registryPro
Every tool an agent can call, with its schema, call count, error rate and latency, and a switch per tool.
On this page
ProCalls, error rates and latency per tool, a switch each and the schema on open.
Installation
Usage
import { ToolRegistry } from "@/components/ui/chatcn/pro/tool-registry"
<ToolRegistry tools={tools} onEnabledChange={setToolEnabled} />Error rates at 1% turn amber with a warning glyph and at 5% red with a cross; set your own steps with thresholds. Destructive tools carry the word, so they stand out before anyone turns them on. Rows open to the input schema in the free json-viewer.
Examples
States
ProNo tools yet, and read only.
Props
| Prop | Type | Notes |
|---|---|---|
tools | RegistryTool[] | { name, description, schema?, calls, errorRate, p50Ms?, enabled, risk? } |
onEnabledChange | (name, enabled) => void | Without it the switches are read only |
thresholds | [number, number] | Amber and red error rates. Default [0.01, 0.05] |
Accessibility
- A real table with column headers. Each switch is named "Enable search_docs".
- Search has a visible label for assistive tech and a clear action when nothing matches.