Skip to main content
Glama

wait_for_text

Polls the Android UI until an element with given text appears and returns its tappable center. Replaces blind wait-then-screenshot for async actions like network loads or navigation.

Instructions

Poll the UI until an element with the given text/content-description appears (or times out), then return it. Use this after an async action (network load, navigation, animation) instead of a blind wait-then-screenshot — it returns as soon as the element is present, with its tappable center. Note: canvas-drawn (RN/Skia) text never enters the hierarchy, so it will time out on those — screenshot instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText or content-description to wait for.
scrollNoWhen true, swipe upward through the current scroll container while polling. Useful when Android omits off-screen ScrollView content from the accessibility tree.
serialNoTarget device serial (adb -s). Optional when exactly one device is attached.
partialNoSubstring match instead of exact. Default true.
timeout_sNoHow long to wait, in seconds. Default 15.
Behavior4/5

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

With no annotations, description carries full burden. Discloses polling behavior, timeout, and return of element with tappable center. Covers edge case of canvas-drawn text timing out. Lacks explicit mention of side effects (e.g., scrolling when scroll=true) or error behavior on timeout, but transparency is good overall.

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, front-loaded with core functionality, then usage guidance and caveat. No filler, every sentence adds value.

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?

Covers core behavior, usage context, and a critical caveat. Does not explain timeout error handling or return format, but given 100% schema coverage and no output schema, the description is sufficient for an agent to use 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.

Parameters3/5

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

Schema coverage is 100%, so baseline is 3. Description does not add extra meaning beyond schema; it mentions 'tappable center' but that pertains to return value, not parameters. No additional param context like format or edge cases.

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?

Clearly states it polls the UI until an element with given text appears or times out, then returns it. Distinguishes from siblings like 'wait' (blind wait) and 'tap_on_text' (tap action). Mentions canvas-drawn text will time out, setting scope.

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?

Explicitly advises use after async actions (network, navigation, animation) as an alternative to blind wait-then-screenshot. Also clearly states when NOT to use (canvas-drawn text) and recommends 'screenshot instead', providing an actionable alternative.

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/iksnerd/adb-mcp'

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