Skip to main content
Glama

wait_for

Pauses browser automation until a selector reaches a specified state, text appears or disappears, a URL substring matches, the network is idle, or a timeout elapses.

Instructions

Wait for selector state (visible/attached/hidden), text present or gone, url substring, network idle, or time ms.

Input Schema

NameRequiredDescriptionDefault
refNoref from snapshot, e.g. e3
tabNotab id, defaults to current
urlNo
idleNo
textNo
timeNo
stateNo
timeoutNo
selectorNoCSS selector
textGoneNo
request_timeoutNoOuter page request deadline in milliseconds; defaults to at least 30000

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, and it does not say what happens on timeout (error vs. silent return), what the default timeout is, whether the call blocks, or whether the supplied conditions are OR'd or AND'd. For an 11-parameter waiting primitive with zero annotation coverage, these are significant omissions.

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 front-loaded sentence with no filler; the parenthetical enumeration keeps it compact. It is arguably too terse for the parameter surface it must cover, but nothing in it is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 11 optional parameters, no annotations, and no output schema, the description should explain timeout expiry behavior and condition-combination semantics. It instead only lists conditions, leaving an agent unable to predict the tool's failure mode or resolution rules.

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 only 36%, but the description does partially compensate by mapping the condition types to parameters: state/selector, text, textGone, url, idle, and time are all named. It adds nothing for ref, tab, timeout, or request_timeout, and leaves the distinction between timeout and request_timeout undocumented.

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 and enumerates the six distinct wait conditions (selector state, text present/gone, url substring, network idle, time ms), which is far more than the name alone conveys. It is clearly distinguishable from action siblings like click or snapshot. It stops short of explaining how the conditions relate to one another when several are supplied.

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 only implied: the enumerated conditions hint at post-navigation / async-page synchronization, but there is no statement about when to prefer wait_for over polling with a sibling, nor when not to use it. No guidance on which condition to choose for a given page-state problem.

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