Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Tool Approval

Preview

Allow this tool to run?
terminal.run
Approval required

The agent wants to run the project test suite in the current workspace.

Command
bun test tests/a11y.test.tsx
Directory
ui-components

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/tool-approval

Import the shared styles once in your application.

TSUsage
import ToolApproval from '@/components/beui/agents/ToolApproval.vue'
import '@/components/beui/styles.css'

API Reference

ToolApprovalCode

code?
string
Default—
language?
string
Defaultbash
class?
string
Default—

ToolApproval

tool
string
Default—
title?
string
Default—
description?
string
Default—
parameters?
ToolApprovalParameter[]
Default[]
status?
ToolApprovalStatus
Defaultpending
v-model:open?
boolean
Defaultundefined
defaultOpen?
boolean
Defaultfalse
@approve?
() => void
Default—
@always-allow?
() => void
Default—
@deny?
() => void
Default—
labels?
Labels

Override any built-in string.

Default—
class?
string
Default—
@open-change?
(value: boolean) => void
Default—
#default?
slot
Default—
#tool?
slot
Default—
#title?
slot
Default—
#description?
slot
Default—
#parameter?
{ parameter: ToolApprovalParameter }
Default—

Composition

Place executable source inside the approval request when the decision depends on reviewing it.

Message
└── MessageContent
    └── ToolApproval
        └── ToolApprovalCode

Note: Approval Card handles broader questions and review decisions. Agent Activity shows the pending and resumed execution context. Tool Result displays the outcome after an approved tool runs.

How it works

Tool approval is a permission boundary. The person must understand what will run, what access it needs, and whether their choice applies once or changes future behavior.

Also on React Native. Hold to let an agent run a tool.(opens in a new tab)

Updated