Skip to main content
Glama

wait_for

Read-only

Pauses browser automation until specified text appears or disappears, or until a set number of milliseconds elapses, using a configurable timeout.

Instructions

等待某个条件:文字出现(text)、文字消失(textGone),或单纯等待若干毫秒(ms)。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "wait_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
msNo
textNo
timeoutNo最长等待毫秒数,默认 15000
textGoneNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds the conditional modes, but it omits what happens when the condition never becomes true, whether the call fails, returns false, or throws, and how the timeout parameter governs the outcome, which is important for a polling/waiting tool.

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?

A single compact sentence that front-loads the verb and enumerates the modes inline. Every clause carries information (mode name plus its parameter name), and there is no filler.

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 4-parameter tool with no output schema and only 25% schema coverage, the description should explain the interplay between the condition parameters and timeout, plus what the tool returns when the wait succeeds or expires. It covers the mode selection well but leaves outcome semantics unspecified, which is a meaningful gap for a blocking wait.

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

Parameters4/5

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

Schema description coverage is only 25% (only 'timeout' is documented), so the description must fill in the rest. It does so for three of the four parameters by glossing text as 'text appears', textGone as 'text disappears', and ms as 'wait N milliseconds'. It does not state whether the condition parameters are mutually exclusive or how they combine with timeout, which keeps it below a 5.

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?

The description names a specific verb (wait for) and lists three distinct condition modes: text appears (text), text disappears (textGone), or a plain millisecond delay (ms). This is enough for an agent to understand the tool's function, but it does not distinguish 'wait_for' from the sibling 'wait_for_download', so the agent must infer that distinction from the sibling names alone.

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 usage is implied by the enumerated conditions but never stated as guidance, such as when to synchronize on text versus when to use a fixed delay. There is also no exclusion pointing to 'wait_for_download' for download flows, so the agent must decide between the two tools on its own.

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