Skip to main content
Glama
devicebase

Devicebase MCP Server

Official
by devicebase

mobile_bash

Execute shell commands on connected Android or HarmonyOS devices via ADB/HDC, returning exit code, stdout, and stderr for remote diagnostics.

Instructions

Run a shell command on the device (adb/hdc platforms only).

A non-zero command exit is reported in data.exitCode, not as a tool error — the API call itself succeeded.

Args: serialno: The mobile device serialno, from list_devices. command: The shell command to run.

Returns: JSON envelope whose data carries exitCode, stdout and stderr.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
serialnoYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries full responsibility for behavior disclosure. It explicitly states that a non-zero exit code is returned in data.exitCode rather than as a tool error, which is a critical behavioral nuance. It also outlines the return envelope with exitCode, stdout, and stderr, making the tool's behavior predictable.

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?

The description is compact and well-structured: a one-sentence purpose, a key behavioral note, then clearly labeled Args and Returns sections. It is front-loaded with the core purpose and avoids unnecessary filler, making it easy to scan.

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?

The description covers the essential aspects: purpose, platform, exit code behavior, parameters, and return format. An output schema exists, so the description need not duplicate full return details, but it does provide a helpful summary. Minor gaps such as possible error conditions or the exact structure of the JSON envelope (beyond exitCode/stdout/stderr) are not critical given the output schema presence.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% — the schema only gives field titles, no descriptions. The description compensates fully by explaining serialno as the device serial from list_devices and command as the shell command to run. This adds meaning that the schema entirely lacks, so a high score is warranted.

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?

The description states a specific verb ('Run'), a clear resource ('shell command on the device'), and a platform restriction ('adb/hdc platforms only'). This unambiguously distinguishes it from the many other mobile_* tools that handle taps, swipes, and app interactions, so an agent can instantly tell what this tool is for.

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 platform restriction (adb/hdc only) gives some guidance on where it applies, but it does not explicitly contrast with alternative tools or state when to prefer this over others. Since the sibling list contains many specialized mobile actions, a note on when a generic shell command is needed (e.g., for operations not covered by other tools) would be clearer. The description implies usage but does not spell it out.

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