Skip to main content
Glama

browser_wait

Pause automation until text, a selector, URL match, or enabled control appears, or until an element disappears, then return what changed; use ms for a fixed delay or no condition for page load.

Instructions

Wait until text appears, a selector is visible, a selector or text is gone, the URL contains a string, or ref enabled is usable; returns what changed. ms: just pause. No condition: waits for load.

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
msNo
goneNo
textNo
enabledNo
timeoutNoms
selectorNo
urlContainsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.6
    • addedInput schema / properties / enabled
      Added value: +{
      +  "type": "integer"
      +}
    • addedInput schema / properties / ms
      Added value: +{
      +  "type": "integer"
      +}
    • changedInput schema / properties / timeout / description
      Previous value: -"milliseconds"New value: +"ms"
  2. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full load. It does disclose the useful outcome 'returns what changed', so the agent knows the result reports state deltas. However, it says nothing about what happens on timeout (does it throw, return false, or return unchanged state), what the default timeout is, or whether it blocks page execution — all material for a waiting primitive.

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?

It is front-loaded with the condition list, then handles the two special modes in short clauses — dense and largely waste-free. Minor readability cost from telegraphic fragments ('ms: just pause') and the ambiguous 'ref `enabled` is usable' clause.

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 7-parameter, all-optional, annotation-free tool, the definition covers what each condition does and the return semantics, which is solid. But with no annotations and no output schema, the missing failure/timeout behavior and any default wait duration leave the agent guessing about edge cases before calling.

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

Parameters4/5

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

Schema coverage is only 14% (just timeout), so the description must compensate, and it largely does: ms=pause, text=appears, selector=visible, gone=selector-or-text-disappears, urlContains=URL match, enabled=ref usable. Only timeout and the precise 'gone vs text+selector' interplay remain unexplained, and the phrase 'ref `enabled` is usable' is opaque without a refs concept.

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 concrete verb (wait) and enumerates the exact conditions it can wait on: text appears, selector visible, selector/text gone, URL contains, ref enabled, plus a pure-pause mode. That is enough for an agent to distinguish this from a generic sleep or from browser_wait_human, though it never explicitly names that sibling as the alternative.

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?

It gives clear mode-selection guidance: 'ms: just pause' and 'No condition: waits for load', which tells the agent how to pick between timed and condition-based waits. It stops short of saying when to use browser_wait at all versus browser_act or browser_wait_human, so no explicit exclusions are offered.

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