Skip to main content
Glama

Wait

browser_wait
Read-only

Pauses browser automation until specified text appears or disappears, an element reaches a state, a URL or load state is met, or a short timeout elapses, synchronizing actions with dynamic pages.

Instructions

Wait for text to appear/disappear, an element state, a URL, a load state, or a fixed time (≤30s).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
nthNo
refNoElement ref from snapshot (preferred)
urlNoGlob or /regex/
nameNo
roleNo
textNoWait until this text is visible
exactNo
labelNo
stateNoState for the target (default visible)
expectNoExpectSpec postconditions
pageIdNo
testIdNo
timeMsNo
withinNoScope to a unique container (ref, role+name, label, testId or CSS selector)
sessionNo
timeoutNo
selectorNoCSS (last resort)
snapshotNoPage state returned after the action: diff (default), full, none
textGoneNo
loadStateNo
placeholderNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true, openWorldHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the 30s cap on fixed waits, but that cap is already encoded as timeMs maximum 30000 in the schema, so genuinely new behavioral context is thin. Nothing is said about what happens on timeout failure or how the post-action page state is returned.

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 compact sentence with the five wait modes front-loaded and no filler. It is efficient, though the terseness is achieved partly by omitting information rather than by tight editing.

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

Completeness2/5

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

For a tool with 21 parameters, nested objects, no required params, and no output schema, one sentence is not enough. Missing are the default timeout behavior, whether a failed wait raises an error, and what the snapshot enum (diff/full/none) returns after the wait — all things an agent needs to call this correctly.

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

Parameters2/5

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

With 21 parameters and only 38% schema description coverage, the description carries the burden of explaining semantics but only gestures at a handful (text, textGone, state, url, loadState, timeMs). Whole families of parameters — ref/nth/role/name/label/testId/within targeting, expect postconditions, snapshot, timeout, session, pageId — get no mention at all, so an agent gains little beyond the schema.

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 names a specific verb (wait) and enumerates the exact conditions it can wait on: text appear/disappear, element state, URL, load state, or fixed time. That is far more precise than the bare name and no sibling overlaps with it, though it never explicitly distinguishes itself from polling siblings like browser_snapshot.

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 list of wait conditions implies when the tool applies, but there is no explicit guidance on when to reach for it (e.g., after navigation or clicks before reading state) or when a different tool is preferred. An agent must infer the workflow context.

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