Skip to main content
Glama

Robot Actions — Remote Device Control

Webpage wait for

webpage_wait_for
Read-onlyIdempotent

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.6/5.0
Behavior5/5

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

Annotations already declare the safe read-only/idempotent profile, and the description adds behavior the annotations cannot convey: 250ms polling inside a single CDP session with no per-tick reconnect, non-throwing return of { found, waitedMs }, and the ANY-match rule when a selector hits multiple elements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and platform scope are front-loaded, and every sentence carries distinct information (polling cadence, return shape, multi-match rule). Sentences are dense and long, but none is 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?

With no output schema, the description supplies the return contract ({ found, waitedMs }) and the timeout semantics (no throw), plus cross-platform applicability and match behavior — everything an agent needs to call and branch on the result.

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

Parameters4/5

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

Schema coverage is 100% so the baseline is 3, but the description adds semantics the schema does not: the selector's multi-match resolution rule and the distinction between mere DOM presence and becoming visible, which informs how `visible` and `selector` interact.

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?

States a specific verb (poll/wait for) and resource (element in the device browser by CSS selector), and explicitly scopes it to both iOS Safari and Android Chrome, which distinguishes it from the platform-specific device_wait_for_element, ios_wait_for_element, and web_wait_for siblings.

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 cross-platform browser framing implies when to pick this over native-element waits (device_wait_for_element) or per-platform browser waits, and the polling/timeout-behavior details clarify usage context. It never names an alternative outright or states an explicit when-not-to-use, so it stops short of a 5.

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