Skip to main content
Glama

Run a command

run_command
Destructive

Run a shell command on the user's computer and return stdout, stderr and the exit code.

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": "run_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory. Defaults to the user's home directory.
deviceNoDevice name. Optional when the account has only one online device.
commandYesShell command to run.
timeout_secondsNoKill the command after this many seconds (default 90, max 600).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / timeout_seconds / description
      Previous value: -"Kill the command after this many seconds (default 60, max 600)."New value: +"Kill the command after this many seconds (default 90, max 600)."
  2. First observed

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and openWorldHint=true, so the safety profile is largely covered. The description adds useful behavioral detail by saying it executes on the user's computer and returns stdout, stderr, and exit code, but it doesn't mention blocking behavior, shell type, or permission implications.

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?

A single sentence, front-loaded with the action and execution context, with no redundant or filler text. It communicates the essential purpose and return values efficiently.

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

Completeness3/5

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

For a powerful, destructive command-execution tool with no output schema and no annotations covering return format, the description does provide the key return fields. However, it leaves out operational context such as whether execution is blocking, how it relates to process-based siblings, and any scope constraints, leaving it only minimally adequate.

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%, with clear descriptions for cwd, device, command, and timeout_seconds. The description adds no parameter-level meaning beyond the schema, so the baseline 3 is appropriate.

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?

The description states a specific verb and resource ('Run a shell command on the user's computer') plus the return contract (stdout, stderr, exit code), so the core operation is unambiguous. It stops short of differentiating itself from process-oriented siblings like start_process or interact_with_process, which matters for a command-execution tool.

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

Usage Guidelines2/5

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

There is no guidance on when to use this one-shot command runner versus start_process, interact_with_process, or read_process_output. The description also omits any cautions about destructive scope, even though the tool is annotated as destructive and open-world.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources