Skip to main content
Glama

browser_wait_for

Read-only

Pause browser automation until specific page conditions are met—visible text, selector presence or absence, URL fragment, JavaScript expression, or a fixed delay.

Instructions

Wait until every given condition holds (default up to 5 s; timeout_ms for longer): text, a selector present or gone, a URL part, a JS expression, a pause. Navigating actions already wait.

Input Schema

NameRequiredDescriptionDefault
jsNoThis expression becomes truthy
msNoJust wait this long
urlNoThe URL contains this
goneNoNo visible element matches this selector
textNoVisible text appears
selectorNoA visible element matches
snapshotNoAlso return the page snapshot after the action
timeout_msNoWait up to this long (default 5000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already flag read-only/open-world, and the description adds the non-obvious behavior that conditions are conjunctive ('every given condition holds') and that navigation actions auto-wait. It omits what happens on timeout (error vs silent return) and whether the wait is blocking, which an agent would want to know. Still well above the annotation baseline.

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?

One sentence plus a short parenthetical enumeration of condition types and one closing caveat. No redundancy, and the core semantics (all conditions must hold) is front-loaded.

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?

For 8 optional parameters with no output schema, the description covers the AND semantic, the default timeout, and the relationship to navigating actions. Timeout-failure behavior and the snapshot return path are left to the schema, so a small gap remains but nothing critical is missing.

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 coverage is 100%, so each of the 8 parameters is already documented. The description contributes mainly the conjunction semantics across parameters and the default timeout value, which is marginal added meaning. Baseline 3 applies.

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 and resource ('Wait until every given condition holds') and enumerates the condition families: text, selector present or gone, URL part, JS expression, pause. The closing note 'Navigating actions already wait' separates it from browser_navigate/click siblings.

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?

Gives the key usage signal - default 5 s cap, use timeout_ms for longer waits - and implicitly tells the agent not to add waits after navigating actions. It does not spell out when to prefer browser_snapshot or how to poll, so it stops short of full routing guidance.

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