Skip to main content
Glama

Run command

shell

Execute one command on a remote peer and return its output and exit code. Chain steps with && or pipes instead of making multiple calls.

Instructions

Run one shell command on the peer and return its output and exit code. Windows peers: PowerShell. macOS / Linux / Android: the login shell. Chain steps in one command (&&, pipes) instead of many calls. Output over ~60 KB is cut in the middle.

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": {
      "peer": "<peer>",
      "command": "<command>"
    },
    "name": "shell"
  }
}

Input Schema

NameRequiredDescriptionDefault
peerYesThe peer's 9-digit rockd ID (from `devices` / `status`), or IP:port to dial directly
commandYes
timeout_secNoGive up after this many seconds (default 300, max 3600). Use spawn for longer jobs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and openWorldHint=true, and the description adds genuinely useful behavior beyond that: exit code is returned, output over ~60 KB is cut in the middle, and the timeout default/max are stated. It still omits the working directory, whether state persists between calls, and what the exit code looks like on failure — notable gaps for an arbitrary-command execution tool.

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?

Four short sentences, front-loaded with the action and return value, followed by platform and chaining notes. Every sentence carries distinct 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?

With no output schema, the description does the necessary work of describing the return payload and the truncation limit. It is nearly complete for this complexity level, missing only execution-context details such as working directory and state persistence across calls.

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 coverage is 67% and the `command` parameter has no schema description at all; the description partially compensates by explaining it runs under PowerShell or the login shell and accepts chaining. The peer and timeout semantics are already fully documented in the schema, so the description adds only marginal meaning there.

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 specific verb and resource ("Run one shell command on the peer") and states exactly what comes back ("output and exit code"). It also distinguishes the execution environment per platform (PowerShell vs. login shell), which no sibling tool does.

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 gives real usage direction: chain steps with && and pipes rather than making many calls, and the timeout parameter points to spawn for longer jobs. It does not cover when to prefer other siblings like click, type_text, or ls, so it stops short of explicit when-not guidance.

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