Skip to main content
Glama
Neem2004

Android ADB MCP Server

adb_execute_shell

Execute safe read-only shell commands on Android using allowlisted prefixes (getprop, dumpsys, pm list), rejecting pipes and injection attempts.

Instructions

Runs a safe shell command on the Android device, restricted to an allowlist of read-only prefixes (getprop, dumpsys, pm list). Command chaining, pipes and injection metacharacters are rejected. / Ejecuta un comando shell seguro en el dispositivo Android, restringido a una lista blanca de prefijos de solo lectura (getprop, dumpsys, pm list). Se rechazan encadenamientos, tuberías y metacaracteres de inyección.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesShell command to execute. Must start with one of the allowlisted prefixes: getprop, dumpsys or pm list. / Comando shell a ejecutar. Debe comenzar con uno de los prefijos permitidos: getprop, dumpsys o pm list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.0.1
    • changedInput schema / properties / command / description
      Previous value: -"Comando shell a ejecutar (solo comandos permitidos)."New value: +"Shell command to execute. Must start with one of the allowlisted prefixes: getprop, dumpsys or pm list. / Comando shell a ejecutar. Debe comenzar con uno de los prefijos permitidos: getprop, dumpsys o pm list."
    • addedInput schema / properties / command / examples
      Added value: +[
      +  "getprop ro.build.version.release",
      +  "dumpsys battery",
      +  "pm list packages -3"
      +]
    • addedInput schema / properties / command / pattern
      Added value: +"^(getprop|dumpsys|pm list)(\\s|$)"
  2. First observedv1.0.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden, and it does a solid job: it states the operation is read-only, restricted to an allowlist, and that chaining, pipes, and injection metacharacters are rejected. It stops short of describing output format or error handling, but the key safety-related behavior is clearly disclosed.

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 English portion is short, front-loads purpose and restrictions, and includes a compact warning about rejected patterns. The Spanish repetition is redundant but compact and does not add significant noise.

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?

For a one-parameter tool with a well-covered schema, the description plus schema is mostly complete: it explains what can be run and what will be rejected. It does not explain what the tool returns, how failures/errors are surfaced, or how to choose between this and specialized sibling tools, which leaves minor gaps.

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?

The input schema has 100% coverage: it documents the single command parameter with a pattern, examples, and a bilingual description. The main description adds rejection of chaining/pipes, but that is more about behavioral constraints than new parameter meaning, so the schema already does the heavy lifting.

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 clearly identifies the action (Runs a safe shell command), the target (Android device), and the exact scope (read-only prefixes getprop, dumpsys, pm list). This makes it distinguishable from the logcat/dump sibling tools, though it does not explicitly compare itself to any sibling.

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

Usage Guidelines3/5

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

The intended use is implied by the allowlist and 'safe/read-only' framing: arbitrary read-only shell queries that are not covered by specialized siblings. However, it never explicitly says when to prefer adb_list_packages or adb_get_logcat, so routing between this and overlapping siblings is left to inference.

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