Skip to main content
Glama
zifanersuotang

Codex Android MCP

Android wait For

android_wait_for
Read-onlyIdempotent

Wait for text to appear or disappear on an Android device, polling OCR until condition met or timeout. Use to gate actions on UI state instead of fixed sleeps.

Instructions

Wait until text appears or disappears on a connected Android device or emulator, polling the OCR path (the same capture+OCR pipeline android_find_text uses) every ~600 ms until the condition holds or timeout_ms expires. A timeout is a normal matched:false answer, NEVER an error — use it to gate an action on a condition instead of looping android_find_text yourself or sleeping a guessed number of seconds. mode "appear" waits for the text to show up (a screen finished loading, a toast rendered); mode "disappear" waits for it to be gone (a spinner, a dialog). On a match, item carries the OCR text, confidence and pixel rect.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoWait for the text to appear (default) or disappear.
textYesText to wait for (case-insensitive substring).
serialNoTarget device serial from android_devices. Defaults to the currently streamed device, else the only connected one.
timeout_msNoHow long to poll before giving up, in milliseconds (default 8000, capped at 60000).
min_confidenceNoMinimum recognition confidence 0..1 for a match (default 0.3).
Behavior5/5

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

The description adds non-obvious behavioral details beyond the annotations: it polls every ~600 ms, and a timeout is a normal matched:false answer, not an error. It also reveals that it uses the same capture+OCR pipeline as android_find_text, which helps set expectations. These are valuable clarifications that the readOnly/idempotent annotations do not cover.

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 well-structured and front-loaded with the core purpose, then explains polling, timeout semantics, and modes. Every sentence serves a purpose, and it is appropriately sized for the tool's complexity without redundancy.

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 is quite complete for a 5-parameter tool with no output schema. It describes the polling behavior, timeout semantics, modes, and mentions the match result fields (text, confidence, pixel rect). However, it could be slightly more explicit about the exact return structure on non-match (e.g., whether 'matched' is always present), though it implies the shape via 'matched:false'. This is a minor gap.

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%, so the baseline is 3. The description repeats default values (e.g., timeout_ms default 8000, mode default 'appear') and serial fallback behavior, but adds little new meaning beyond what's in the parameter descriptions. It does provide helpful context around modes, but that's already in the schema. No significant extra value is added.

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 clearly states the tool waits until text appears or disappears on a connected Android device, using OCR polling. It explicitly contrasts with android_find_text (which does a one-shot search) and mentions the OCR pipeline, making it easy to distinguish from siblings like android_find_text and android_tap_text.

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 recommends using this tool to gate an action on a condition, instead of looping android_find_text or sleeping a guessed number of seconds. It also explains when to use 'appear' vs 'disappear' with concrete examples (screen loaded, toast, spinner, dialog), providing clear usage context.

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/zifanersuotang/codex-android-mcp'

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