Skip to main content
Glama

wait_for_text

Read-onlyIdempotent

Wait until specified text appears anywhere on the page, ideal after actions that load dynamic content like success messages. Optionally set a timeout to prevent indefinite waiting.

Instructions

[Agent Browser] Wait for specific text to appear anywhere on the page. Use after actions that trigger dynamic content (e.g., "Loading complete", "Success"). More reliable than wait() for async operations with known completion text.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "text": "<text>"
    },
    "name": "wait_for_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
timeout_msNo

Output Schema

NameRequiredDescriptionDefault
dataNo
hintsNo
messageNo
successNo
suggestionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered. The description adds that the match is anywhere on the page and that it is more reliable than wait() for async completion. It does not say what happens on timeout (error, false, exception) or whether polling is involved, which matters for a blocking wait.

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?

Three short sentences, front-loaded with the core action, followed by the usage trigger and the comparison. No filler; could be tightened only slightly.

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?

An output schema exists so return values need not be explained, and annotations cover the safety profile. Still missing for a blocking wait tool: timeout semantics and what a failed wait produces, plus match rules for the text parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description needs to carry parameter meaning and largely does not. It says the text is matched 'anywhere on the page' but leaves substring vs exact match and case sensitivity unstated, and timeout_ms (units, default 10000, behavior at expiry) is entirely undocumented in both description and 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 and resource: wait for specific text to appear anywhere on the page. The parenthetical examples ('Loading complete', 'Success') reinforce what kind of text is meant. It implicitly separates itself from wait() by calling out the known-completion-text case, though it never names the other wait_for* siblings.

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

Usage Guidelines4/5

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

Gives a concrete trigger condition: use after actions that produce dynamic content, and contrasts with wait() when completion text is known. No explicit when-not guidance (e.g., when text is unknown or the page is static, use wait()/wait_for_load_state instead).

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