Skip to main content
Glama
raspberry-pi-connect-mcp

raspberry-pi-connect-mcp

run_command

Execute shell commands on a Raspberry Pi through Connect's remote shell, returning output and exit code; persistent sessions keep directory and environment changes between calls.

Instructions

Run a shell command on a device through its Connect remote shell and return output + exit code. The shell session persists between calls (cwd, env vars). First call to a device takes ~30s to connect. Commands that wait for input (sudo password, editors, confirmations) will time out; use send_keys/read_screen for those.

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

Input Schema

NameRequiredDescriptionDefault
deviceYesDevice name (or unique substring of it) or device UUID, as shown by list_devices
commandYesShell command line (bash) to run
timeout_secNoMax seconds to wait for completion

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it discloses several non-obvious traits: output plus exit code are returned, the shell session persists (cwd, env vars) across calls, and the first connection to a device costs ~30s. It leaves out consequences of destructive commands and any output size/truncation limits, which keeps it below a 5.

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?

Three dense sentences with zero filler: purpose and return first, then session persistence, then latency, then the failure mode with an alternative. Information is front-loaded in decreasing order of operational importance.

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 3-parameter tool with no output schema and no annotations, the description covers return values, statefulness, cold-start latency, and the main failure mode. Minor gaps remain around authorization requirements and output size limits, but nothing an agent needs to invoke it correctly is missing.

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 100%, so device, command, and timeout_sec are already documented. The description adds only indirect meaning — that input-waiting commands will hit the timeout — without clarifying timeout semantics or the 1800s cap. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource ('Run a shell command on a device') plus the exact return ('output + exit code'), and distinguishes itself from interactive siblings by naming send_keys/read_screen. An agent can tell immediately this is non-interactive command execution.

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?

Explicitly states when not to use it — commands awaiting input (sudo password, editors, confirmations) will time out — and routes those cases to send_keys/read_screen. The device parameter also points to list_devices for name resolution, so the sibling routing is concrete rather than implied.

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