Skip to main content
Glama

Wait For Element

android_wait_for_element
Read-only

Wait for a UI element to appear using text, resource ID, or class name. Returns element info and coordinates, replacing fixed sleeps for dynamic content.

Instructions

Wait until a UI element appears on screen. Use this instead of a fixed sleep when content loads dynamically. Returns element info and center coordinates when found.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoMatch by exact visible text
deviceNoDevice id (serial or host:port). Optional -- when omitted, uses ANDROID_MCP_DEVICE env or auto-selects the connected device (physical devices preferred over emulators).
timeoutNoMax seconds to wait. Defaults to 10.
classNameNoMatch by class name, e.g. 'android.widget.Button' or just 'Button'
resourceIdNoMatch by resource id. Short ids like 'btn_login' are auto-expanded using the foreground app package
contentDescNoMatch by accessibility label / content description (substring, case-insensitive)
textContainsNoMatch by substring of visible text (case-insensitive)
Behavior3/5

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

Annotations already declare readOnlyHint=true, so the description's statement about waiting and returning coordinates adds some behavioral context. But it lacks details on timeout behavior or what happens if the element never appears. Given annotations, a 3 is appropriate.

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 short, front-loaded sentences with no wasted words. The first sentence defines the purpose; the second provides usage guidance and outcome.

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

Completeness3/5

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

With 7 parameters and no output schema, the description briefly mentions return types ('element info and center coordinates') but is vague about what 'element info' includes. It also doesn't address edge cases like timeout. Adequate but not thorough.

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 description does not need to explain parameters in detail. It adds no extra meaning beyond the schema, earning the baseline of 3.

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 for a UI element to appear, using specific verbs 'Wait' and 'appears'. It distinguishes from sibling tools like android_tap_element or android_list_elements by focusing on the waiting/observation aspect.

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?

Explicitly advises using this instead of a fixed sleep for dynamic content, providing clear context. However, it does not specify when not to use or list alternatives beyond the implied 'fixed sleep'.

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

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