Skip to main content
Glama

Wait for the page

browser_wait_for
Read-only

Wait until text appears or is gone, the URL matches, or a time passed, then return the page. Actions already wait: use it only when something must still appear. text matches visible text ignoring case and spacing; with a condition, time_ms is its longest wait. A timeout answers wait_timeout.

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
urlNoWait until the URL contains this; * is a wildcard.
textNoWait until this text is on the page.
tab_idNoA result's tab_id.
time_msNoAlone: a plain delay in ms, the last resort. With a condition: its longest wait.
text_goneNoWait until this text is gone.
session_idNoOnly with several sessions.
timeout_msNoGive up after this many ms, default 10000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations only cover safety and world-access traits; the description adds real behavior on top: text matching ignores case and spacing, time_ms becomes the longest wait when a condition exists, and a timeout surfaces as wait_timeout rather than passing silently. It stops short of saying what 'return the page' actually yields, which is the one substantive behavior gap.

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?

Three tightly packed sentences with the primary capability front-loaded and no filler. The telegraphic style ('A timeout answers wait_timeout.') is efficient but slightly clipped, costing a little readability.

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 a 7-parameter, no-required-field wait tool with full schema coverage and no output schema, the description supplies the essentials: triggers, timeout behavior, and the fallback ordering for time_ms. It does not spell out how multiple conditions combine (AND vs OR) or what the returned page contains, which keeps it from being complete.

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 100%, so a 3 is the floor, and the description earns more by explaining two non-obvious interactions the schema cannot: case/spacing-insensitive text comparison and the dual role of time_ms (plain delay alone vs. cap when a condition is present). The url wildcard and session/tab scoping are left entirely to the schema, holding it below 5.

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?

The description names a specific verb and enumerates the exact trigger conditions ('until text appears or is gone, the URL matches, or a time passed') plus the terminating behavior ('then return the page'). It also carves out its niche against the other browser_* tools with 'Actions already wait: use it only when something must still appear.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit when-not ('Actions already wait: use it only when something must still appear') and an explicit escalation ordering ('Alone: a plain delay in ms, the last resort'), so an agent knows not to reach for a fixed sleep. The exclusion is stated in terms of tool behavior rather than a named sibling, which still makes the decision unambiguous.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.