Skip to main content
Glama

wb_wait

Waits until text appears, a CSS selector matches a specified state, or the document is ready, with a timeout to synchronize browser automation.

Instructions

Wait until text appears, CSS selector matches, or document is ready (timeout).

Input Schema

NameRequiredDescriptionDefault
urlNoExact expected URL
textNoSubstring to wait for in document.body.innerText
stateNoSelector state; default visible. Multiple conditions use AND.
sessionNoPer-call session override (does not change the process default)
selectorNoCSS selector to wait for
timeoutMsNoTimeout ms (default 15000)
intervalMsNoPoll interval ms (default 400)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does signal that the call blocks and is bounded by a timeout, which is the key behavioral trait, but it does not say what happens on timeout (throw vs. return false), whether multiple conditions AND together (only the schema says this), or that it polls at an interval.

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 tight sentence with the core conditions front-loaded and no filler. It is arguably too terse for a blocking tool, but nothing in it is wasted.

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?

For a 7-parameter, zero-annotation, no-output-schema tool, the description omits the timeout failure mode and the return value, both of which an agent needs to branch on. The schema fills in parameter-level detail, but overall behavior around failure and results is left unstated.

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 all seven parameters, including the state enum and default values, are already documented. The description adds only the high-level mapping of conditions; 'document is ready' loosely corresponds to the url parameter, which could mildly confuse an agent expecting a readiness flag.

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?

Specific verb 'wait' with three named conditions (text appears, CSS selector matches, document ready), which clearly distinguishes it from immediate-read siblings like wb_get_text and wb_snapshot. It does not explicitly name any sibling as an alternative, but the purpose is unambiguous.

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 implied: call this to block until a condition holds, presumably after wb_navigate or before reading/clicking. However, the description never states when to prefer this over polling with wb_find/wb_get_text, nor any preconditions such as an active session requirement.

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