Skip to main content
Glama

Robot Actions — Remote Device Control

Device wait for element

device_wait_for_element
Read-onlyIdempotent

Poll the UI until an element with the given text or resource-id appears, or timeout. Returns element coordinates in PHYSICAL pixels (ready for device_tap).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNoVisible text or content-desc to wait for
udidYesDevice serial number (UDID)
timeoutNoMax wait time in ms (default: 10000)
intervalNoPoll interval in ms (default: 1000)
resourceIdNoResource ID to wait for (e.g. com.android.settings:id/switch_widget)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the description's value-add is disclosing the polling behavior and the return contract: coordinates are in PHYSICAL pixels and directly consumable by device_tap. It stops short of describing what happens on timeout (error vs null), which would complete the picture.

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 lean sentences with zero waste: the polling behavior and matching criteria come first, then the return contract. Every clause earns its place.

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?

With no output schema, the description correctly compensates by explaining the return value (element coordinates in physical pixels) and the downstream consumer (device_tap). The only gap is timeout/failure semantics for a tool whose primary risk is a negative result.

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 eaach parameter is already documented. The description reinforces the two match modes (text or resource-id) but adds no syntax or default information beyond what the schema provides, so the baseline 3 applies.

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 states a specific verb (poll) plus the resource and match criteria (element with given text or resource-id), and clarifies it waits until appearance or timeout. It implicitly distinguishes itself from device_find_element (which likely returns immediately), though it never names that sibling, keeping it just short of a 5.

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 phrase 'poll... until... or timeout' implies this is the tool for waiting on asynchronous UI, but there is no explicit when-to-use versus device_find_element or device_scroll_to_element, nor any exclusions. Usage is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources