Skip to main content
Glama

browser_wait_for

Read-only

Waits until specified page conditions hold—text appears, selector matches, URL contains a value, element disappears, or a set time passes—so browser automation proceeds only when ready.

Instructions

Wait until every given condition holds (default 5 s). Navigating actions already wait.

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_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
jsNoBecomes truthy
msNoWait this long
urlNoURL contains this
goneNoThis selector is gone
textNoText appears
selectorNoSelector matches
snapshotNoSnapshot after the action
timeout_msNoDefault 5000

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv0.9.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / gone / description
      Previous value: -"No visible element matches this selector"New value: +"This selector is gone"
    • changedInput schema / properties / js / description
      Previous value: -"This expression becomes truthy"New value: +"Becomes truthy"
    • changedInput schema / properties / ms / description
      Previous value: -"Just wait this long"New value: +"Wait this long"
    • changedInput schema / properties / selector / description
      Previous value: -"A visible element matches"New value: +"Selector matches"
    • changedInput schema / properties / snapshot / description
      Previous value: -"Also return the page snapshot after the action"New value: +"Snapshot after the action"
    • changedInput schema / properties / text / description
      Previous value: -"Visible text appears"New value: +"Text appears"
    • changedInput schema / properties / timeout_ms / description
      Previous value: -"Wait up to this long (default 5000)"New value: +"Default 5000"
    • changedInput schema / properties / url / description
      Previous value: -"The URL contains this"New value: +"URL contains this"
  2. First observedv0.7.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, which the description does not contradict — a polling wait is a read operation. Beyond annotations it adds two useful behavioral facts: the 5 s default and, crucially, that all conditions must hold conjunctively, plus that navigating actions already wait internally. It omits timeout-failure behavior and whether calling it with no conditions is a plain sleep.

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 short sentences, front-loaded with the core behavior and the default, with no wasted wording. The second sentence is a high-value usage caveat rather than filler.

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 an 8-parameter tool with no output schema, the description covers the essentials (AND semantics, default timeout) but leaves real gaps: whether a timeout raises an error or returns a status, what 'snapshot' does to the return, and what an empty condition set means. Adequate but not complete.

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 the schema already documents all 8 parameters, and the baseline is 3. The description adds only the AND semantics across conditions; it does not explain the interaction between 'ms' and 'timeout_ms' or the role of the 'snapshot' flag, which the terse schema hints also leave ambiguous.

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+resource ('wait until every given condition holds') plus a default (5 s), which is far more specific than the name alone. The clause 'Navigating actions already wait' implicitly separates it from browser_navigate/click, though it never names a sibling outright.

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?

'Navigating actions already wait' is a genuine when-not-to-use cue that steers the agent away from redundant waits after navigation. It gives no guidance on what to do when a wait fails or which alternative (e.g. browser_snapshot) to pair with, so it stops short of full when/how guidance.

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