Skip to main content
Glama

Wait for Element to Appear [Pro]

wait_for_element

Waits for a specific UI element to appear on screen by polling the UI tree. Use after navigation to wait for a button, text, or field, returning as soon as the target element is found.

Instructions

[Pro] Waits for a specific UI element to appear on screen by polling the UI tree. More reliable and faster than wait_for_settle — returns as soon as the target element is found. Use after navigation to wait for a specific button, text, or field to appear. Example: wait_for_element('Find Routes') after selecting a station.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
device_idYesDevice serial ID
queryYesDescription of the element to wait for, e.g. 'Find Routes button' or 'search results'
timeoutNoMaximum time to wait in milliseconds (default: 5000)
poll_intervalNoTime between polls in milliseconds (default: 300)
Behavior3/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It explains the polling mechanism and that it returns upon detection, but does not mention what happens on timeout (likely returns an error or null), resource implications, or whether it modifies state. With no annotations, a 3 is appropriate as it covers core behavior but leaves some uncertainty.

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 three sentences, each serving a purpose: states functionality, compares with sibling, and gives usage example with example. No filler or tautology.

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?

Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description adequately covers purpose, usage, and a basic example. It does not detail error handling or return value, but the example helps. With 4 parameters and 100% schema coverage, the description is sufficiently complete.

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 adds no additional parameter meaning beyond what the schema already states, except for an example usage that illustrates how query might be used. This does not significantly augment understanding.

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 by polling the UI tree, with a specific verb ('waits for') and resource ('UI element'). It distinguishes from the sibling tool wait_for_settle by noting it is 'more reliable and faster' and 'returns as soon as the target element is found'.

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?

The description provides explicit usage context: 'Use after navigation to wait for a specific button, text, or field to appear.' It also contrasts with wait_for_settle, but does not explicitly state when not to use this tool or list alternatives beyond that sibling.

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/saranshbamania/mobile-device-mcp'

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