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 working_directory; timeout_seconds clamped to 1–1800 (default 120). 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
device_idYes
timeout_secondsNo
working_directoryNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/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, and the description corroborates with 'Can modify system or files; confirm consequential commands.' It goes beyond annotations by disclosing timeout clamping (1–1800, default 120) and the macOS root-shell helper prerequisite, though it omits output capture behavior, error reporting, and any concurrency/rate limits.

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?

The purpose is front-loaded and the paragraph is dense with no filler, but it is a single long run-on sentence using semicolons, and abbreviations like 'macOS -root shells' read awkwardly. It is efficient and every clause carries information, just not ideally structured.

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 high-risk, no-output-schema execution tool, the description covers targeting, shell choice, timeout bounds, and mutation risk. The notable gap is return-value behavior (where stdout/stderr appear, truncation, exit codes), which an agent needs to interpret results, but the definition is otherwise sufficient to invoke correctly.

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?

With 0% schema description coverage across 5 parameters, the description carries the full load and mostly succeeds: it explains device_id (target selection), command (the command line), shell (valid values per OS), timeout_seconds (range and default), and that working_directory is optional. Only working_directory's semantics (relative vs absolute, default behavior) remain thin.

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 opens with a precise verb+resource: 'Execute a shell command on a registered, authorized online device.' This cleanly separates it from sibling tools like read_file, write_file, or kill_process, which are narrow single-purpose operations on the same devices. An agent can pick this tool for arbitrary execution without opening the schema.

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

Usage Guidelines4/5

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

It provides concrete usage context: device_id selects the target, shell selects the interpreter (with per-OS valid values), macOS root shells need a local helper, and it advises confirming consequential commands. It does not, however, name alternatives (e.g., prefer read_file/write_file over shelling out) or state when-not-to-use, so it falls short of full routing guidance.

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