Skip to main content
Glama

wait_for

Pauses browser automation until specified text appears (up to 15 seconds) or for a set duration, helping scripts synchronize with page content.

Instructions

Wait until text appears on the page (up to 15s), or just wait seconds.

Input Schema

NameRequiredDescriptionDefault
textNo
secondsNo
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.4/5.0
Behavior3/5

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

Adds genuinely useful behavior beyond annotations: a hard 15s ceiling for text waits and a default wait. However, it omits what happens on timeout (error vs silent return), whether matching is substring or selector-based, and annotations only give readOnlyHint=false plus openWorldHint=true without clarifying any of this.

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 both modes front-loaded and no filler. Minor cost: the compression is what leaves the timeout/return behavior ambiguous.

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?

With no output schema and no parameter documentation, the description should state the result of a timeout and what `text` matches against. It gives the time bound but not the outcome, which is the key unknown for a blocking wait.

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 0%, so the description must compensate. It explains `text` and `seconds` conceptually but not their exclusivity/defaults (seconds defaults to 2), leaves matching semantics undefined, and never mentions the required `session_id`.

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?

Names a specific action (wait) and the two operating modes: until text appears, or a fixed duration. This distinguishes it from the sibling `find`/`read_text` tools only implicitly, since it never says those don't wait.

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?

The two modes are stated, which implies usage, but there is no guidance on when to prefer waiting versus polling with `snapshot`/`find`, nor when to use `seconds` alone instead of `text`.

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