Skip to main content
Glama

run_command

Destructive

Execute a shell command on a registered, authorized online device. device_id selects target, command is the command line, shell selects powershell/pwsh/cmd (Windows) or zsh/bash/sh (macOS); macOS -root shells need a local helper. Optional project associates an operation outcome (no command/output text) with the encrypted local project event log, using the same account quota allocation. Working_directory optional; timeout_seconds defaults to 120; positive values have no DNS-DATA imposed maximum, and 0 disables the gateway/Agent command deadline. Can modify system or files; confirm consequential commands.

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": {
      "device_id": "<device_id>",
      "command": "<command>"
    },
    "name": "run_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
shellNopowershell
commandYes
projectNo
device_idYes
timeout_secondsNo
working_directoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / project
      Added value: +{
      +  "default": "",
      +  "title": "Project",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructive/not-read-only/not-idempotent, and the description adds real substance beyond that: timeout semantics (default 120, 0 disables the deadline, no imposed maximum), the fact that the project link logs only an outcome with no command or output text, and the macOS root-shell helper requirement. It stops short of covering failure modes, permission/auth prerequisites, or what the agent gets back from execution.

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

Conciseness4/5

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

It is front-loaded with the core action and packs parameter semantics into compact semicolon-separated clauses, with no filler sentences. The density is high and slightly crammed, but every clause conveys information an agent needs, so it earns its length.

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?

For a six-parameter, destructive, open-ended execution tool with no output schema and no schema descriptions, the definition covers targeting, shell selection, timeout, working directory, and logging side effects well. The main gap is that it never describes what comes back from a command execution (exit status, stdout/stderr capture), which matters more here because no output schema exists to explain it.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must carry all parameter meaning, and it does: device_id as target selector, command as the command line, shell values enumerated per OS (powershell/pwsh/cmd vs zsh/bash/sh), project as optional event-log association with a privacy note, working_directory as optional, and timeout_seconds with default and the special 0 semantics. That is meaning well beyond the bare schema titles.

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 opens with a precise verb+resource: "Execute a shell command on a registered, authorized online device," which immediately tells an agent what the tool does and the scope it operates on (paired online devices only). It does not explicitly distinguish itself from neighboring process-oriented tools like interact_with_process or kill_process, which keeps it from a 5.

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?

It gives one piece of conditional guidance ("confirm consequential commands") and one platform constraint ("macOS -root shells need a local helper"), plus notes that the project param shares account quota. There is no explicit statement of when to prefer this over interact_with_process or list-based tools, so usage context remains implied rather than spelled out.

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