Skip to content
Browse docs and components

Tool Approval

tool-approval

An agent asking before it acts: the question first, its arguments one click below, and Allow once, Always allow and Deny in a footer that folds away once answered, leaving a record of the outcome.

Responsive

Install

$npxshadcnadd@forme/tool-approval

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

ToolApproval

An agent asking before it acts.

PropTypeDefaultDescription
tool*ReactNode—The tool's name, in mono: delete_branch, send_email.
titleReactNode"Allow this tool to run?"
descriptionReactNode—What will happen, in a sentence the reader can say yes or no to.
parametersreadonly ToolApprovalParameter[][]The arguments the agent wants to call it with.
status'running' | 'error' | 'complete' | 'pending' | 'approved' | 'denied'"pending"
defaultOpenbooleanfalseOpens the parameters. Closed by default, so the question is read before the details.
onApprove() => void—
onAlwaysAllow() => void—Shows "Always allow" when set.
onDeny() => void—
classNamestring—