Skip to main content
Glama

wait

Pauses browser automation until one condition occurs: text appears/disappears, element state changes, URL matches, page load completes, or a duration passes; timeout errors name the condition.

Instructions

Wait for exactly one condition: text (appears), text_gone, target with state (visible default, hidden, attached, detached), url (substring or /regex/), load_state, or ms (unconditional, at most 30000). On timeout the error names the condition.

Input Schema

NameRequiredDescriptionDefault
msNo
tabNoTab id such as "t3"; default is the active tab
urlNo
textNo
stateNo
targetNo
text_goneNo
load_stateNo
timeout_msNoTimeout in ms; default is the configured action/navigation timeout

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Adds meaningful behavior beyond the openWorldHint annotation: the timeout produces an error that names the failed condition, and ms is an unconditional sleep capped at 30000. It doesn't say whether the call throws vs. returns on timeout explicitly, nor describe polling behavior, but the critical failure semantics are disclosed.

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?

A single dense sentence with the primary constraint front-loaded and conditions enumerated in parentheses. Efficient, though the parenthetical enumeration of state and url forms makes it slightly harder to scan than a short bulleted phrasing would be.

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?

For a 9-parameter tool with no output schema, the description covers what matters: the condition menu, the exclusivity rule, the ms cap, and timeout error behavior. Remaining gaps (tab scoping and timeout_ms default) are documented in the schema, so nothing essential is missing.

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

Parameters5/5

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

With only 22% schema description coverage, the description compensates heavily: it explains url accepts substrings or /regex/, that state defaults to visible when paired with target, that ms is the unconditional mode with a 30000 cap, and that condition params are alternatives. This is semantic detail the schema cannot convey.

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 (wait) and enumerates exactly what it waits on: text, text_gone, target/state, url, load_state, ms. This is precise and immediately distinguishable from siblings like snapshot or evaluate, which read state rather than block on it.

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?

'Wait for exactly one condition' establishes the key usage constraint (mutual exclusivity of condition types) that no schema field expresses. It does not name alternatives or say when a wait is unnecessary (e.g., vs. snapshot or evaluate), leaving some inference to the agent.

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