Skip to main content
Glama
ghost-in-the-droid

ghost-in-the-droid

Official

run_flow

Execute ordered batches of UI automation steps (tap, type, launch app) in one server-side round-trip. Returns a single final screenshot, reducing tokens and latency. Steps stop on first error.

Instructions

Run an ordered batch of tool calls server-side in ONE round-trip.

steps is a JSON list of {"tool": "", "args": {...}} — the same tool names execute_tool exposes (tap, tap_element, type_text, launch_app, etc.). Steps run in order and stop at the first error. Returns a JSON object with per-step results and a SINGLE final screenshot (not one per step) — far fewer tokens/round-trips than calling each tool separately. Steps do NOT auto-settle between UI actions; if a step needs the screen to update before the next one reads it, insert an explicit {"tool":"wait","args":{...}} step.

Example: run_flow("SERIAL", '[{"tool":"launch_app","args":{"package":"com.android.settings"}}, {"tool":"find_on_screen","args":{"text":"Wi-Fi"}}, {"tool":"tap","args":{"x":540,"y":300}}]')

Security: fail-closed allow-list — only vetted read/UI tools may run inside a flow. Anything else (raw shell, run_skill, or any unknown tool) makes the whole flow be refused before any step runs, since a batch is exactly where an injected instruction would smuggle a shell command. Max 50 steps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stepsYes
deviceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description carries full behavioral disclosure. It reveals execution order, stop-on-first-error behavior, the single final screenshot return, the lack of auto-settling, the fail-closed allow-list security model, and the 50-step maximum. This goes far beyond a basic tool summary.

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 front-loaded with the core purpose and then efficiently details behavior, security, and limitations. The example is compact and illustrative. Every sentence adds meaningful information, and nothing is redundant.

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

Completeness5/5

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

Given the tool's complexity, the description covers invocation format, return value shape, exception handling, concurrency concerns, security restrictions, and step limits. An output schema is present, so return-value details need not be repeated. It is complete enough for an agent to select and invoke the tool correctly in most scenarios.

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?

The schema provides only type 'string' for both params with 0% description coverage, so the description must compensate. It thoroughly explains the `steps` parameter with format, allowed tool names, and a full example. However, the `device` parameter is only shown in the example ('SERIAL') without explicit explanation, leaving one parameter semantically under-specified.

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 opens with a specific verb and resource: 'Run an ordered batch of tool calls server-side in ONE round-trip.' This clearly distinguishes it from sibling tools like run_workflow or individual action tools, and the example reinforces its batch execution purpose.

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

Usage Guidelines5/5

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

The description explicitly states when to use this tool ('far fewer tokens/round-trips than calling each tool separately'), provides a concrete example, and explains when to insert wait steps because 'Steps do NOT auto-settle between UI actions.' It also clarifies which tools are allowed and that unvetted tools cause refusal, giving strong usage boundaries.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ghost-in-the-droid/android-agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server