Skip to main content
Glama

Wait for Condition

browser_wait
Read-only

Waits for a browser element state, URL substring, or page load state with a bounded timeout, ensuring automation proceeds only when the target condition is met.

Instructions

Wait with a bounded timeout for an element state, URL substring, or page load state.

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
stateNoElement state to wait for when `selector` is provided (default: visible)
task_idNoOptional task ID for execution tracking and cancellation
selectorNoWait for an element matching this selector
loadStateNoWait for page load state when no selector/urlContains is specified
timeoutMsNoBounded wait timeout in milliseconds (500-30000)
session_idNoOptional target browser session ID (defaults to active default session)
urlContainsNoWait until current page URL contains this substring

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds that the wait is 'bounded', which is useful, but it does not disclose the key behavioral fact for a wait tool: what happens when the condition is not met before the timeout (throw, return false, partial result). It also says nothing about whether the call blocks the session.

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 front-loaded sentence with no filler, and the bounded-timeout constraint appears early. It is arguably too terse for a seven-parameter tool, but nothing in it is wasteful.

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?

Seven optional parameters, no output schema, and no required fields make the calling convention ambiguous in one respect: with no args, what does it wait for, and what does success/failure return? The description does not resolve whether the tool returns a status, and since there is no output schema to explain return values, that gap is on the description.

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 parameter including the two enums is documented in the schema, and the schema already explains the mode-selection logic ('when selector is provided', 'when no selector/urlContains is specified'). The description's enumeration largely restates that. Baseline 3 is appropriate.

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') and enumerates the three things it can wait for: element state, URL substring, and page load state. That maps cleanly onto the three modes of the tool. It does not differentiate itself from siblings like browser_verify or browser_observe, which an agent might reasonably confuse with waiting for a condition.

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?

Implicit usage is discernible: use this when the page needs time to reach a state rather than acting immediately. There is no explicit 'use when'/'do not use when' guidance and no mention of the closest alternatives (browser_verify, browser_observe, browser_read_page) that an agent could pick instead.

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