Skip to main content
Glama

android_shell

Read-onlyIdempotent

Run an allowlisted shell command on the Android device. First element of cmd array must be allowlisted: input, pm, dumpsys, am, getprop, screencap, monkey, uiautomator, settings, wm, cmd, content, ls, cat, pidof, ps, echo, service.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cmdYesShell command to run (array form preferred, space-separated accepted). Example: 'getprop ro.build.version.release' or ['getprop', 'ro.build.version.release']
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.
channel_account_idNoAndroid device channel_account ID. Omit when the workspace has a single Android device; REQUIRED when it has more than one (e.g. WhatsApp + LINE), else the call is rejected as ambiguous.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  2. Added
  3. Removed
  4. Changed1 schema field changed
    • addedInput schema / properties / channel_account_id
      Added value: +{
      +  "description": "Android device channel_account ID. Omit when the workspace has a single Android device; REQUIRED when it has more than one (e.g. WhatsApp + LINE), else the call is rejected as ambiguous.",
      +  "type": "integer"
      +}
  5. Added

TDQS

B3.3/5.0
Behavior1/5

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

Annotations declare readOnlyHint=true and idempotentHint=true, but the description explicitly licenses state-changing commands (input, am, pm, settings, content, monkey) which modify the device and are not idempotent. The description therefore contradicts the safety annotations rather than reinforcing them.

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?

Two tight sentences: purpose first, then the binding constraint. The 15-item allowlist is bulky but every token is required information, and nothing is redundant with the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, so return-format omissions are acceptable, and the core allowlist constraint is covered. But for a shell-execution tool the description is silent on timeouts, output capture/truncation, error behavior when a command is not allowlisted, and what execution context the command runs in.

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 100%, so the baseline is 3, but the description adds a real constraint the schema omits: the first element of cmd must be on a fixed allowlist, effectively an implicit enum of valid values. It does not, however, clarify the string-vs-array type handling beyond what the schema already documents.

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 an allowlisted shell command on the Android device') and immediately scopes it with the command allowlist. An agent can distinguish this generic shell escape hatch from the dedicated action tools (android_tap, android_type, android_screenshot) 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 Guidelines2/5

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

The description states the allowlist but gives no when-to-use guidance and never mentions the sibling alternatives that overlap (android_tap, android_type, android_screenshot, android_ui_dump). Nothing tells the agent when to reach for android_shell versus those dedicated tools.

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.