Skip to main content
Glama
andresolbach

nodriver-mcp-server

Wait for text

wait_for
Read-only

Wait until any of the specified texts appears on the page, then capture a snapshot. Returns immediately when text is found, so you don't waste time on fixed delays.

Instructions

Wait until one of several texts appears on the page, then snapshot it.

The right way to wait after an action that starts loading — far more reliable than guessing a delay, and it returns the moment the text shows up instead of always burning the whole timeout.

On success the page snapshot is included in the response, so no separate take_snapshot call is needed.

Polls the visible text twice a second. To wait for an element rather than for wording, use wait_for_selector.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesTexts to wait for — the wait ends as soon as any one of them appears. Passing both outcomes, e.g. ["Welcome back", "Login failed"], lets one call tell you which happened. Matching is a case-sensitive substring test against the page's visible text.
browserNoWhich browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name.default
timeoutNoMaximum wait in milliseconds before giving up.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.5.0
    • addedInput schema / properties / browser
      Added value: +{
      +  "default": "default",
      +  "description": "Which browser to act on. Each name is an independent Chrome, created on first use. Omit for the shared default; parallel agents each need their own name.",
      +  "type": "string"
      +}
  2. First observedv1.7.2

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already cover read-only/non-destructive behavior. The description adds genuine behavioral context beyond that: polling interval ('twice a second'), the return of a snapshot on success, and the fall-through behavior (returns as soon as text appears rather than burning the whole timeout). It does not explicitly state timeout failure behavior, a minor gap, hence not a 5.

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?

Four concise, front-loaded sentences. Purpose, use-case, key behavior, and alternative are each given in separate efficient statements with zero filler. Every sentence earns its place.

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

Completeness5/5

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

For a tool with a full input schema (100% coverage), an output schema, and annotations covering safety, the description provides all needed context: when to use, what happens on success, polling behavior, and the sibling alternative. Nothing an agent needs to decide or invoke correctly is missing.

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 100%, so the baseline is 3. The description repeats some parameter semantics (e.g., 'one of several texts') already in the schema but adds no new meaning beyond what the schema states. It earns the baseline but no more.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a clear verb-resource-action statement: 'Wait until one of several texts appears on the page, then snapshot it.' This distinguishes it from the sibling wait_for_selector by explicitly naming the alternative and contrasting waiting for text vs. element.

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

Usage Guidelines5/5

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

It provides explicit usage context: 'The right way to wait after an action that starts loading' and contrasts with guessing a delay. It also names the alternative (wait_for_selector) and gives the condition for choosing that tool instead, leaving no ambiguity.

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