Skip to main content
Glama

destructive-command

Destructive

Runs shell commands that require client-side user approval, handling destructive or privileged operations refused by run-command with APPROVAL_VIA_TOOL.

Instructions

Execute a shell command on a profile with approvalPolicy = "client-tool", where calling this tool is the approval: the MCP client asks the user before the call runs. Use it when run-command refuses a destructive or privileged command with APPROVAL_VIA_TOOL; it takes the same arguments. On a profile with any other approvalPolicy it runs nothing and points back at run-command (CLIENT_TOOL_ONLY). Single-line only: a command containing a line break is refused, so upload a multi-line script with sftp-upload and run it by path.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "command": "<command>"
    },
    "name": "destructive-command"
  }
}

Input Schema

NameRequiredDescriptionDefault
ttyNoAllocate a pseudo-terminal
commandYesShell command to execute
profileNoProfile name
sessionNoRun in an existing interactive session (stateful)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only carry destructiveHint=true, so the description must carry the rest — and it does: it discloses the approval mechanism (the client asks the user before the call runs), the failure mode and error code on non-matching profiles (CLIENT_TOOL_ONLY), and the single-line input restriction with its resolution path. That is substantial behavior beyond the annotation.

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?

Dense but front-loaded: the approval condition comes first, then the routing rule versus run-command, then the input constraint and workaround. Every sentence carries distinct, decision-relevant information with 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?

Covers the gate, the trigger, the negative case, and the input limitation, which is everything needed to call it correctly. The only omission is return behavior (stdout/stderr, exit code, what happens under tty/session), which a shell-execution tool would benefit from stating since there is no output schema.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds real meaning beyond it: a constraint on the `command` value (line breaks are refused) and the hint that the arguments match run-command's. It does not explain tty, session, or profile semantics, which the schema already covers adequately.

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

Purpose5/5

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

States a specific verb and resource ('Execute a shell command on a profile') and immediately scopes it to profiles with approvalPolicy = "client-tool". It also names the sibling it is not (run-command) and the condition that separates them, so an agent can distinguish it without opening any schema.

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

Usage Guidelines5/5

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

Gives an explicit trigger ('Use it when run-command refuses a destructive or privileged command with APPROVAL_VIA_TOOL'), an explicit when-not ('On a profile with any other approvalPolicy it runs nothing and points back at run-command'), and a further alternative for the multi-line case (sftp-upload plus run-by-path). Nothing is left to inference.

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