Skip to main content
Glama

wait_for

Pauses browser automation until a CSS selector state, page text substring, URL substring, or combined condition is satisfied; caps polling at 60 seconds.

Instructions

Wait for a CSS selector state, visible page text substring, URL substring, or combination. Clamped to 60s cap.

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": "wait_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabNo
textNo
stateNovisible
selectorNo
timeout_msNo
url_containsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It does disclose one genuine behavioral trait beyond the schema: a 60-second hard cap, which tells the agent that large timeout_ms values are silently reduced. However, it omits critical behavior for a blocking tool: whether it raises/returns on timeout, and whether the listed conditions combine as AND or OR despite saying 'or combination'.

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?

Two short sentences with the condition list front-loaded and the cap constraint second; nothing is padded. The cap sentence is terse to the point of being slightly clipped ('Clamped to 60s cap') but still unambiguous.

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?

An output schema exists, so return values need not be spelled out, and the cap is covered. For a six-parameter blocking wait tool with zero annotations, though, the definition should state timeout behavior and how multiple conditions are combined; those omissions are the difference between an agent waiting correctly and misreading a race condition.

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 description coverage is 0%, so the description must compensate and mostly does: it maps 'text' to a visible-page text substring, 'selector' to a CSS selector state, and 'url_contains' to a URL substring, which is meaning the bare titles do not convey. The gaps are 'tab' (never mentioned) and the valid values for 'state' (no enum in the schema, no allowed values in the description), leaving the default 'visible' undefined.

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 gives a specific verb ('wait for') and enumerates the waitable conditions: CSS selector state, visible text substring, URL substring, or a combination. This is far more than a restatement of the name and an agent can tell roughly what it does. It stops short of differentiating itself from siblings like 'state' or 'wait_for_human', so it is clear but not sibling-aware.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this tool over 'wait_for_human' or 'state', nor any statement of exclusions or preconditions (e.g., call after navigate). The only hint is the enumeration of waitable conditions, which implies usage but does not guide selection. An agent must infer the call site from the name alone.

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