Skip to main content
Glama

Wait for the page

browser_wait

Wait until text appears, text disappears, or a CSS-selected element becomes visible, so automation handles delayed content and spinners; returns a clear timeout error if unmet.

Instructions

Wait until text appears, text disappears, or an element becomes visible — for pages that load content after the fact (search results, spinners, SPAs). With no condition, waits timeoutMs. Fails with a clear message on timeout.

Input Schema

NameRequiredDescriptionDefault
textNoWait until this text is on the page.
tabIdNo
selectorNoWait until an element matching this CSS selector is visible.
textGoneNoWait until this text is gone (e.g. "Loading…").
timeoutMsNoGive up after this long (default 10000, max 60000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose two useful traits the structured fields do not: the no-condition fallback to timeoutMs and that a timeout produces a failure with 'a clear message'. It omits what a successful wait returns, whether a failure is a thrown error vs. a soft result, and whether multiple conditions are combined (AND/OR).

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 sentences, both load-bearing: the first establishes modes and use context, the second covers the default and the failure mode. The most decision-relevant information (what it waits for) is front-loaded with no filler.

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 five-parameter, zero-required coordination tool, the description covers purpose, triggers, defaults, and failure behavior. The remaining gap is the return value: with no output schema and no annotations, an agent still doesn't know what a successful wait yields, so the definition is not fully self-contained.

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 80%, so the baseline is 3. The description adds meaning beyond the schema by stating the behavior when no condition parameter is supplied (falls back to timeoutMs), which the schema does not express, and by framing text/textGone/selector as alternative wait modes. It says nothing about tabId, the one undocumented parameter.

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?

Opens with a specific verb and resource ('Wait until...') and enumerates the three distinct modes the tool supports: text appears, text disappears, element visible. The scoping clause 'for pages that load content after the fact (search results, spinners, SPAs)' makes it immediately separable from siblings like browser_read, browser_click, or browser_eval.

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?

Gives clear when-to-use context via concrete triggers (search results, spinners, SPAs) rather than a generic statement. It also explains the degenerate case ('With no condition, waits timeoutMs'). It stops short of naming an alternative or an explicit when-not-to-use, so it is strong context without being complete routing guidance.

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