Skip to main content
Glama

shell

Executes device commands and returns exit code, output, and screen changes, so agents can change settings like night mode or brightness, open URLs, and adjust simulator appearance.

Instructions

Run a device shell command: exit code, output, screen change. Prefer it for settings: cmd uimode night yes, settings put system screen_brightness 20, am start -a android.intent.action.VIEW -d <url>. Simulator: simctl ui appearance dark. A physical iPhone has no shell.

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

Input Schema

NameRequiredDescriptionDefault
commandYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries full disclosure and does well: it names the return artifacts (exit code, output, screen change) and a platform capability boundary. It omits risk context an agent would want for an arbitrary-command tool — privileged/permission requirements, timeouts, and that state-mutating commands are irreversible — so it is strong but not complete.

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?

Front-loaded with the purpose and return values before examples, and every backticked snippet demonstrates a distinct pattern (Android settings, intent launch, iOS simulator). It is dense but not padded; the platform caveat sentence is slightly abrupt but earns its place.

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 one-parameter tool with no annotations and no output schema, the definition covers purpose, return values, platform applicability, and command format. Remaining gaps — error/failure reporting and execution limits — are minor relative to the tool's simplicity.

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?

Schema coverage is 0% and the single `command` parameter is otherwise undocumented, so the description must compensate. It does so with worked examples showing the expected command dialect for Android (`cmd uimode night yes`, `settings put ...`, `am start ...`) and simulator (`simctl ui appearance dark`), which conveys format and platform switching far beyond the bare schema.

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 specific verb and resource — 'Run a device shell command' — and immediately tells the agent what comes back (exit code, output, screen change). It does not name a sibling tool directly, but the 'Prefer it for settings' framing implicitly separates it from UI-interaction tools like tap/type.

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 states a positive selection rule ('Prefer it for settings') with three concrete command examples, plus a hard platform exclusion ('A physical iPhone has no shell') and the simulator alternative. It stops short of saying when to avoid shell in favor of the dedicated tap/type/press tools, so the when-not side is only partially covered.

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