Skip to main content
Glama

Wait for condition

wait_for
Read-only

Blocks browser automation until specified text appears or disappears, a CSS selector matches a visible element, the network is idle, or a fixed time passes, bounded by a timeout.

Instructions

Waits until text appears or disappears, a CSS selector matches a visible element, the network is idle, or a fixed time passes. Always bounded by timeoutMs.

Input Schema

NameRequiredDescriptionDefault
textNoWait until this text is visible on the page.
tabIdNoTab to act on. Defaults to the session target tab (see tab_select).
timeMsNoJust wait this many milliseconds.
selectorNoWait until this CSS selector matches a visible element.
textGoneNoWait until this text is no longer visible.
timeoutMsNoGive up after this many milliseconds (default 10000).
networkIdleNoWait until no network request has been in flight for 500 ms.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds the useful constraint that every mode is bounded by timeoutMs, but it is silent on key behavior: what happens on timeout (throw vs. return a false/status), and whether multiple supplied conditions are ANDed or raced.

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?

Two sentences, front-loaded with the enumerated modes and closed with the bounding constraint. No filler, no restatement of the name or title.

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, all-optional tool with no output schema, the description covers the condition space but leaves the return/failure contract undefined. An agent cannot tell from the definition whether a timeout raises an error or yields a success flag, which matters for control flow.

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 every one of the 7 parameters is already documented in the schema, including the 10000 ms default for timeoutMs and the 500 ms network-idle definition. The description only restates the timeout bound and adds no syntax, precedence, or interaction detail beyond the schema.

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 (waits) plus the four concrete condition modes (text appear/disappear, visible selector match, network idle, fixed time), which maps cleanly onto the schema. It is clearly distinct from sibling action tools like click or page_snapshot, but does not explicitly name a sibling it replaces or supersedes.

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: an agent infers it should call this before reading/asserting on content that may not have loaded yet. There is no explicit when-to-use, when-not-to-use, or statement about choosing this over polling with page_snapshot or evaluate.

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