Skip to main content
Glama

Robot Actions — Remote Device Control

webpage_wait_for

Poll for an element to appear (and optionally become visible) in the device browser by CSS selector — works on BOTH iOS Safari and Android Chrome. Polls every 250ms inside a single CDP session (no reconnect per tick) until found or timeoutMs elapses. Returns { found, waitedMs } rather than throwing on timeout, so callers can branch on the result. When the selector matches several elements, ANY of them satisfying the test counts as found — so a control duplicated across responsive breakpoints is reported visible when the on-screen copy is.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesDevice UDID / serial (iOS or Android)
pageIdNoTarget page/tab id — auto-picked when omitted
socketNoAndroid only: abstract unix socket name (default: chrome_devtools_remote)
visibleNoAlso require the element to be visible (has client rects and a laid-out offsetParent, or position:fixed) rather than merely present in the DOM (default: false)
selectorYesCSS selector to wait for
timeoutMsNoMax time to wait in milliseconds (default: 5000, max: 30000)
platformVersionNoIgnored (kept for compatibility)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly. It discloses the 250ms polling interval, single-CDP-session behavior, non-throwing timeout semantics with { found, waitedMs }, and the ANY-element matching rule for duplicate selectors across breakpoints. This is rich, decision-relevant behavior beyond the bare schema.

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 front-loaded with the core purpose and platform scope, then adds mechanics, return behavior, and an edge case in a logical order. Every sentence contributes useful information without redundancy or filler.

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

Completeness5/5

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

For a polling tool with no annotations and no output schema, the description is complete: it covers what is polled, how often, cross-platform support, timeout behavior, return shape, and the multi-element matching nuance. An agent has what it needs to call the tool and interpret the result without consulting additional sources.

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 schema already documents all seven parameters. The description adds some contextual meaning around the visible option and matching semantics, but it does not add per-parameter meaning beyond what the schema provides, matching the baseline for full coverage.

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 opens with a specific verb and resource: 'Poll for an element to appear (and optionally become visible) in the device browser by CSS selector.' It also states the cross-platform scope ('works on BOTH iOS Safari and Android Chrome'), which distinguishes it from native-app or desktop-web wait tools like device_wait_for_element or web_wait_for.

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 gives clear context: it is for device browsers via CSS selector, explicitly covering iOS Safari and Android Chrome. It does not explicitly name alternatives to use instead (e.g., web_wait_for for desktop or device_wait_for_element for native apps), so it stops short of full exclusion guidance.

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