Skip to main content
Glama

wait_for_ui_node

Read-only

Polls Android UI Automator until a node with exact text, resource-id, content-desc, or focus appears. Configurable timeout and poll interval.

Instructions

Poll Android UI Automator until a node matching exact text, resource_id, content_desc, and/or focused state exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoExact node text to match
focusedNoWhether the node must currently be focused
timeout_msNo
resource_idNoExact UI Automator resource-id to match
content_descNoExact content-desc to match
device_serialNoADB serial such as emulator-5554, a USB serial, or host:port. If omitted, the active device is used; a sole ready device is selected automatically.
poll_interval_msNo
Behavior4/5

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

Annotations declare readOnlyHint=true, so the agent knows this is a safe read operation. The description adds the key behavioral trait of polling (persistent waiting) until a condition is met, which goes beyond the annotation. It does not disclose what happens when the timeout is reached (e.g., error or return false), but the schema includes a timeout parameter, partially mitigating the gap.

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 a single, concise sentence that front-loads the main action ('Poll Android UI Automator') and then specifies the condition. There is no redundant information or unnecessary detail.

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?

The description captures the core purpose but omits important behavioral details such as what the tool returns (no output schema exists) and what happens on timeout. For a polling tool, specifying the timeout outcome and return type would significantly improve completeness. The current description is adequate but leaves clear gaps for an agent to infer behavior.

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 71%, with 5 of 7 parameters described. The description adds value by clarifying that the match criteria (text, resource_id, content_desc, focused) can be combined using 'and/or', a nuance not present in the individual schema descriptions. However, it does not add meaning for timeout_ms, poll_interval_ms, or device_serial, which remain only partially specified in the schema.

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's function: polling Android UI Automator until a node matching specified criteria exists. It names the specific verb 'Poll', the resource 'Android UI Automator node', and the matching conditions, distinguishing it from sibling tools like assert_ui_node which likely performs a one-shot check, and dump_ui which dumps the current hierarchy.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for waiting until a UI node appears but provides no explicit guidance on when to choose this tool over alternatives, nor any exclusions. For example, it does not mention 'use assert_ui_node for immediate existence checks' or 'use wait_for_ui_node when a node may appear asynchronously'. The context is implied by the 'poll until' language but not explicitly stated.

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/francbonet/Adb-MCP-Server'

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