Skip to main content
Glama

Wait for condition or delay

browser_wait
Read-only

Waits for a CSS selector or text to reach a visible, hidden, attached, or detached state, or pauses for a fixed delay up to 30 seconds.

Instructions

Wait for a CSS selector or text to reach a state (visible, hidden, attached, detached), or wait for a fixed number of milliseconds.

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
msNoFixed delay in milliseconds (0-30000).
textNoVisible text substring to wait for.
stateNoTarget state when selector or text is given (default 'visible').
tabIdNoControlled tab id.
selectorNoCSS selector to wait for.
timeoutMsNoMaximum time to wait for selector/text condition in milliseconds (default 10000, max 30000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description usefully distinguishes the blocking-condition mode from the unconditional delay mode, but says nothing about the outcome on timeout (error vs silent return) or whether a delay blocks the whole session, which are the behaviors an agent most needs to plan around.

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 front-loaded sentence that names both modes without filler. It is efficient, though the parenthetical state list could have been spent on the timeout semantics instead, since the enum is already in the schema.

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

Completeness4/5

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

All six parameters are optional and fully documented in the schema, and there is no output schema to explain. The description covers both operating modes adequately, but a synchronization tool benefits from stating failure behavior on timeout, which is absent.

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%, including the state enum, ranges for ms and timeoutMs, and a default of 10000. The description merely restates those modes and adds no interpretation, such as how ms interacts with timeoutMs or whether state applies to text as well as selector. Baseline 3 applies when the schema carries the full burden.

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?

States a specific verb ('wait') plus the two mutually exclusive modes it supports: a selector/text condition with four enumerated states, or a fixed millisecond delay. An agent can immediately tell this is a synchronization primitive and not an action tool like browser_click or browser_type.

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 by the nature of the tool — wait before acting on dynamic content. There is no explicit guidance on when to prefer a selector wait over a fixed ms delay, nor any note about combining it with subsequent actions or what to do when the wait fails.

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