Skip to main content
Glama

browser_wait

Pauses browser automation until a specified element is visible or page text contains a target string, resuming when the condition is met or the timeout expires.

Instructions

Wait until an element is visible, or until page text contains a string.

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": {
      "tabId": "<tabId>"
    },
    "name": "browser_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNoElement ref from the latest snapshot in this document.
textNo
tabIdYesTab id from browser_tabs.
browserNoBrowser id from browser_list, or chrome/firefox when only one instance matches.
frameIdNoFrame id from browser_frames; defaults to top frame.
revisionNoReject if the DOM revision differs from the snapshot.
selectorNoCSS selector. Must identify exactly one element.
timeoutMsNo
documentIdNoReject the action if this snapshot document has changed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden and it does not disclose timeout behavior — whether a timeout throws, returns a falsy result, or what the tool returns at all. It also omits whether the wait polls, whether it returns immediately if the condition is already true, and which DOM revision checks apply.

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 well-formed sentence with the two wait conditions front-loaded and no filler. It is efficient, though the terseness leaves behavioral gaps that belong to other dimensions rather than to verbosity.

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?

With 9 parameters, no annotations, and no output schema, the definition should say what is returned (element? matched text? nothing) and how the two wait modes combine. Those gaps matter for a tool whose whole contract is a conditional, potentially failing wait.

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 coverage is 78%, so most parameters are already documented (ref, selector, revision, documentId, frameId). The description adds only the mapping of element-visibility to element parameters and text matching to `text`, but says nothing about precedence or interaction when both a selector/ref and `text` are supplied.

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?

States a specific verb ("Wait") plus the two concrete conditions it waits on: element visibility and page text containing a string. An agent can distinguish this from observation siblings like browser_snapshot or browser_observe, though the description never names those alternatives explicitly.

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?

Usage is only implied: the two conditions map loosely onto supplying an element ref/selector versus the `text` parameter. There is no guidance on when to prefer waiting over polling with browser_observe, whether both conditions can be combined, or what to do on timeout.

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