Skip to main content
Glama

Run an approved command

shell.run_approved
Destructive

Executes a previously approved command exactly as stored, using its original program, arguments, and working directory. Requires a request_id and enforces single-use approvals.

Instructions

Execute a previously-APPROVED command exactly as stored.

Takes only a request_id; the program, args, and cwd are always the originals captured when the request was created. Approvals are single-use, so a request cannot be replayed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
request_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYes
argsYes
riskYes
errorNo
stderrNo
stdoutNo
messageNo
outcomeYes
programYes
approvalNo
executedYes
trace_idYes
timed_outNo
request_idNo
returncodeNo
risk_reasonYes
approval_statusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds real substance: the program, args, and cwd are fixed originals, and approvals are single-use so replay is impossible. That single-use/no-replay constraint is important behavioral context not present in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with the action, then the parameter story, then the irreversibility caveat. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need no explanation, and annotations cover the safety profile. The description supplies the immutability and single-use rules; the only real omission is how a request_id is generated/obtained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and request_id has no schema description, so the description must compensate. It does clarify that request_id points to a stored approved request whose fields are immutable, but it never explains how to acquire a request_id or what happens if it is invalid/expired.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb and resource ('Execute a previously-APPROVED command exactly as stored') and the 'APPROVED' qualifier distinguishes it conceptually from the sibling shell.run. It never names shell.run explicitly, so differentiation is implied rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage ('a previously-APPROVED command', 'request was created') but gives no explicit when-to-use vs shell.run, no prerequisite steps, and no hint about how a request_id is obtained. The reader must infer the workflow.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.