Skip to main content
Glama

wait_for_ui

Wait for a UI element to appear, disappear, or the screen to change on an Android device, with configurable timeout and polling interval.

Instructions

Poll for a bounded UI, foreground, disappearance, or screen-change condition.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
poll_msNo
activityNo
selectorNo
timeout_msNo
package_nameNo
disappearanceNo
screen_changeNo
Behavior2/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It only says 'Poll' without mentioning blocking behavior, timeout handling, poll intervals, or failure modes. The schema exposes timeout_ms and poll_ms, but the description does not explain the actual execution semantics.

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 sentence, concise and front-loaded with the main action. It wastes no words and is appropriately sized for its content.

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

Completeness2/5

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

The tool has 7 parameters, a complex nested selector, and no output schema, yet the description is only a short phrase. It lacks critical details like return values, timeout behavior, and how to construct a valid condition, making it insufficient for a tool of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for parameter meaning. It vaguely references 'foreground', 'disappearance', and 'screen-change' which map to some parameters, but gives no explicit semantics for any of the 7 parameters or the nested selector object. This leaves the agent guessing.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Poll') and identifies the resource (UI condition), mentioning concrete conditions like foreground, disappearance, and screen-change. This distinguishes it from sibling tools like ui_find and ui_dump, though 'bounded UI' is somewhat ambiguous.

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 its usage (polling for conditions) but never explicitly states when to choose this over alternatives like ui_find or ui_dump. There are no exclusions or alternative mentions, so it relies on the reader to infer context.

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/EF-Code/scrcpy-mcp'

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