Skip to main content
Glama
Neem2004

Android ADB MCP Server

adb_execute_shell

Run allowlisted read-only shell commands (getprop, dumpsys, pm list) on an Android device via ADB, rejecting chained or injected commands with a descriptive error.

Instructions

Runs a read-only shell command on the Android device, restricted to an allowlist of safe prefixes: getprop (read system properties), dumpsys (dump services) and pm list (list packages). Anything else — including command chaining (&&, ||, ;, |) and injection metacharacters — is rejected with a descriptive error. / Ejecuta un comando shell de solo lectura en el dispositivo Android, restringido a la lista blanca de prefijos seguros: getprop (propiedades del sistema), dumpsys (volcado de servicios) y pm list (listado de paquetes). Cualquier otra cosa —incluidos encadenamientos (&&, ||, ;, |) y metacaracteres de inyección— se rechaza con un error descriptivo.

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. Changed1 schema field changedv1.0.2
    • addedInput schema / properties / command / title
      Added value: +"command"
  2. 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|$)"
  3. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it declares the operation is read-only, lists the exact permitted prefixes, and explicitly states that chaining operators and injection metacharacters are rejected with a descriptive error. It omits return-value/pagination shape, so it stops short of 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Each language block is front-loaded and free of wasted words, leading with the read-only constraint before the rejection rules. The full English/Spanish duplication roughly doubles the length, which is a minor conciseness cost.

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 single-parameter read-only tool with no output schema or annotations, the description covers safety profile, scope, and error behavior adequately. It does not describe what a successful command returns, but that gap is small given the tool's simplicity.

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 description coverage is 100% and the pattern itself already enforces the allowlist, so the schema does the heavy lifting. The description's allowlist restatement and the schema examples add no meaning beyond what the structured field already conveys, keeping this at the baseline.

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 ('Runs a read-only shell command on the Android device') and enumerates the exact allowlisted prefixes (getprop, dumpsys, pm list), which lets an agent distinguish it from siblings like adb_get_logcat or adb_dump_hierarchy.

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 description sharply delimits what is in scope (allowlisted prefixes) and what is rejected, which is useful context. However, it never names an alternative sibling or states conditions for choosing this tool over adb_list_packages, whose 'pm list' functionality overlaps.

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