Skip to main content
Glama

batch_actions

Runs a sequence of Android UI actions—such as tap, type, swipe, key, wait, or open app—in one call, stopping at the first error by default. Use it to automate multi-step phone or emulator tasks without root.

Instructions

Execute a sequence of non-root Android UI actions (tap, type_text, swipe, key, wait, open_app, open_settings, current_app, list_apps, ui_tree) in one call. Stops on the first error by default.

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": {
      "steps": "<steps>"
    },
    "name": "batch_actions"
  }
}

Input Schema

NameRequiredDescriptionDefault
stepsYesOrdered list of action steps, e.g. [{ "action": "tap", "index": 1 }, { "action": "type_text", "text": "wifi", "submit": true }, { "action": "ui_tree", "onlyChanged": true }].
onlyChangedNoWhen returnUiTree is true, return only the delta diff (+/~/-) against the previous ui_tree.
stopOnErrorNoStop execution immediately if a step fails (default true).
returnUiTreeNoAppend a final ui_tree snapshot after running all steps.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the default fail-fast behavior ('Stops on the first error by default'), but does not say whether completed steps are rolled back or returned as partial results, nor what an error response looks like. The 'non-root' constraint is stated but its enforcement consequences are not.

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 sentences, zero padding. The core capability and the action vocabulary come first, with the error-behavior caveat as a short trailing clause.

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 batch tool with no annotations and no output schema, the definition covers the action set and the failure policy, which are the two things an agent most needs before calling. It stops short of describing the per-step result shape or whether partial output is returned on failure, which matters for a multi-step executor.

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 coverage is 100%, so the schema already documents steps, onlyChanged, stopOnError, and returnUiTree, giving a baseline of 3. The description does add the action vocabulary available inside the generic 'steps' object array, which the schema only illustrates with three examples, but it does not explain ordering or per-action parameters.

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 ('Execute a sequence') and a bounded resource ('non-root Android UI actions'), then enumerates the ten action types it accepts. The 'in one call' phrasing separates it from the single-action siblings like tap, swipe, and type_text.

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?

The phrase 'in one call' plus the action list makes the intended use — chaining several UI actions into one round trip — clear without saying so explicitly. The 'non-root' qualifier implies root-level work belongs to the root_* siblings, but no alternative is named outright and no when-not guidance is given.

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