Skip to main content
Glama

android_wait_for_element

Wait for a UI element to appear on Android screen by polling the accessibility tree. Use after navigation to ensure the screen is ready before interacting with elements.

Instructions

Wait for a UI element to appear on Android screen. Polls the accessibility tree until the element is found or timeout is reached. Use this FIRST after navigation to ensure screen is ready, then use find_element + tap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoExact text match for the element
textContainsNoPartial text match (case-insensitive)
contentDescNoExact content-description match
contentDescContainsNoPartial content-description match (case-insensitive)
resourceIdNoResource ID match (e.g., 'com.app:id/button' or just 'button')
indexNoIf multiple elements match, select the nth one (0-indexed, default: 0)
timeoutMsNoMaximum time to wait in milliseconds (default: 10000)
pollIntervalMsNoTime between polls in milliseconds (default: 500)
deviceIdNoOptional device ID. Uses first available device if not specified.
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by explaining the polling mechanism, timeout behavior, and accessibility tree scanning. It mentions the tool will wait 'until the element is found or timeout is reached' which clarifies the success/failure conditions. However, it doesn't specify what happens on timeout (error? null return?) or whether this blocks other operations.

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 perfectly structured in two sentences: first explains what the tool does and how it works, second provides clear usage guidance. Every word earns its place with zero redundancy or fluff. It's front-loaded with the core functionality.

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 tool with no annotations and no output schema, the description does an excellent job explaining the core behavior and usage context. It covers the polling mechanism, timeout, and workflow positioning. The main gap is the lack of information about return values or timeout handling, which would be helpful given the absence of an output schema.

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?

With 100% schema description coverage, the input schema already documents all 9 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema, so it meets the baseline of 3. The description's focus is on tool behavior rather than parameter details.

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 specific action ('Wait for a UI element to appear on Android screen') and the mechanism ('Polls the accessibility tree until the element is found or timeout is reached'). It distinguishes this tool from siblings like android_find_element by emphasizing the waiting/polling behavior rather than immediate lookup.

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 provides explicit guidance on when to use this tool ('Use this FIRST after navigation to ensure screen is ready') and what to do next ('then use find_element + tap'). It clearly positions this as a prerequisite step before other interaction tools, offering practical workflow advice.

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/igorzheludkov/metro-logs-mcp'

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