Skip to main content
Glama

browser_wait

Wait for a browser condition—element, text, URL, network idle, load, or timeout—before continuing automation. Use a URL substring or element reference to pause until the target state appears.

Instructions

Wait for a condition. urlPattern is a URL substring; network_idle observes fewer than 2 requests for 500ms, with an explicit DOM quiet fallback if CDP is unavailable.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

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

Input Schema

NameRequiredDescriptionDefault
refNoElement reference from browser_snapshot (e.g. "@e12"). Preferred over index; also used to target a scroll container.
textNo
tabIdNoOptional browser tab id to act on instead of the focused tab.
untilYes
pollMsNo
visibleNo
selectorNo
timeoutMsNo
urlPatternNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It does valuable work defining network_idle (fewer than 2 requests for 500ms) and disclosing a DOM-quiet fallback when CDP is unavailable, but it says nothing about what happens when the condition is never met, whether the call errors or returns a status, or how timeoutMs interacts with the wait.

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?

Two short sentences, front-loaded with the purpose and followed by the highest-value clarifications. Dense and free of filler, though the second sentence crams two distinct facts together.

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?

A 9-parameter wait tool with no annotations and no output schema needs more: the six wait modes are only partially characterized, failure/timeout semantics are absent, and most parameters are undocumented anywhere. The definition is not sufficient for an agent to call this confidently across all modes.

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 only 22%, so the description must compensate. It clarifies urlPattern as a substring and explains network_idle, but leaves text, selector, visible, pollMs, timeoutMs and five of the six `until` modes undefined in both schema and prose.

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?

"Wait for a condition" names a specific verb and the general resource, and the follow-on clauses make clear the conditions are URL patterns and network-idle states. It does not name or contrast with a sibling such as agent_task_wait, so the reader must infer that this is the browser-side wait rather than a task wait.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to choose this tool over alternatives, nor any exclusion such as when not to use network_idle versus load. The only implied usage comes from the enum of conditions in the schema, which the description does not elaborate.

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