Skip to main content
Glama

destructive-command

Destructive

Runs a shell command only after the MCP client asks the user for approval, enabling destructive or privileged commands refused by run-command with APPROVAL_VIA_TOOL; single-line commands only.

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. Changed1 schema field changedv2.31.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Addedv2.28.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the destructiveHint annotation, the description discloses critical behavior: the call itself serves as user approval via the MCP client, failure on other approval policies returns CLIENT_TOOL_ONLY, and line breaks are refused so multi-line scripts must be uploaded separately. These are exactly the operational constraints an agent needs to avoid misuse.

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?

The description is front-loaded with purpose and usage, then flows into failure modes and restrictions. Every sentence carries necessary information—approval semantics, alternative routing, and the single-line constraint—with no filler or redundancy.

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

Completeness5/5

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

Given the tool's complexity (destructive execution, approval gating, single-line restriction) and the rich schema coverage, the description covers all prerequisites, failure modes, alternatives, and operational limits. With no output schema, there is no need to explain return values, making the definition complete for an agent to act correctly.

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 description coverage is 100%, so the baseline is 3. The description adds only that it 'takes the same arguments' as run-command, which is a minor semantic hint but does not elaborate on any individual parameter beyond what the schema already provides.

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?

The description states a specific verb (Execute) and resource (shell command on a profile with approvalPolicy = client-tool), and explicitly distinguishes this tool from run-command by the approval mechanism. An agent can immediately understand that this is the approval-gated command executor, not a general command runner or privileged-only tool.

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?

It gives precise when-to-use guidance: 'Use it when run-command refuses a destructive or privileged command with APPROVAL_VIA_TOOL.' It also states when not to use it: on other approval policies it runs nothing and points back at run-command (CLIENT_TOOL_ONLY). This covers both the positive and negative conditions, leaving no ambiguity about alternatives.

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