Skip to main content
Glama

browser_wait

Read-onlyIdempotent

Waits until a CSS selector or visible text appears, enabling scripts to synchronize with page updates without polling. Use browser_eval for JavaScript predicates.

Instructions

Wait for a CSS selector or visible text (read-only; for JS predicates use browser_eval).

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
tabNoTab index string (e.g. '0'), targetId, or URL/title substring.
textNoVisible text substring.
frameNoIframe #fN, id, URL substring, or 'any'.
timeoutNoTimeout ms (default 15000).
selectorNoCSS selector.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.1

TDQS

A3.8/5.0
Behavior3/5

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

The annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint=false, so '(read-only)' largely restates what is structured. What the description does add beyond annotations is the eval split for JS-based waits. It omits the behavior an agent most needs: what is returned on success (element handle, boolean, text?) and what happens on timeout (error vs. silent return).

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?

One sentence with the core purpose front-loaded and the exception in a parenthetical, so it reads efficiently. The parenthetical is slightly overloaded for its length but every clause carries information.

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

Completeness3/5

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

For a zero-required-parameter tool with no output schema, the definition covers what to wait on and where (tab, frame) via the schema, but leaves the return value and timeout-failure semantics unexplained. Those are the remaining gaps an agent would want before relying on this in a batch flow.

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 100%, so every one of the five parameters is already documented in the schema, including timeout default of 15000 ms. The description only echoes the selector/text pair and adds no syntax, precedence, or default guidance beyond that, which is the expected baseline when the schema does the work.

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?

The description gives a specific verb (wait for) and resource (CSS selector or visible text), which is exactly what the tool does. It also pre-empts the most likely confusion by pointing JS-predicate waits to browser_eval, so an agent can tell it apart from that sibling without opening either schema.

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?

'For JS predicates use browser_eval' is an explicit routing rule to the alternative, which is the main usage fork for a wait tool. It stops short of saying when not to use it (e.g. use browser_text or browser_snapshot for immediate reads) and does not say what happens if neither selector nor text is supplied.

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