Skip to main content
Glama

wait

Pause execution until a selector appears, text is present, a field is filled or matches a value, or a timeout elapses, so agents avoid repeated page reads.

Instructions

Wait without spending model rounds. Use selector+hasValue to block until another agent fills a field, selector to wait for an element, text to wait for page text, or ms to sleep. Prefer this over repeatedly reading the page while waiting for someone else.

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"
  }
}

Input Schema

NameRequiredDescriptionDefault
msNoWait this many milliseconds (max 30000)
textNoWait until the page contains this text
tabIdNo
valueNoWith selector: wait until that field equals this exact value
timeoutNoMax wait for selector/text in ms (default 10000)
hasValueNoWith selector: wait until that field is non-empty
selectorNoWait until this CSS selector matches

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.3.0
    • addedInput schema / properties / hasValue
      Added value: +{
      +  "description": "With selector: wait until that field is non-empty",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / value
      Added value: +{
      +  "description": "With selector: wait until that field equals this exact value",
      +  "type": "string"
      +}
  2. First observedv0.2.1

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses that the call blocks without spending model rounds and that it can wait for another agent or for page conditions, but it does not discuss timeout behavior, failure modes, or what happens when the condition is never met; those details remain in the schema rather than the description.

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?

The description is compact and front-loaded, immediately stating the core purpose and then enumerating the invocation modes. Every sentence contributes either usage guidance or parameter semantics, with no redundant restatement of the tool name.

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

Completeness4/5

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

For a blocking wait tool with no output schema and high schema coverage, the description covers the main modes and the key recommendation to avoid polling. It is nearly complete, though it could mention timeout/max-wait expectations or failure behavior to fully prepare the agent for blocked calls that never resolve.

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 coverage is high at 86%, so the baseline is 3. The description adds meaningful parameter semantics beyond the schema by explaining mode combinations, especially selector+hasValue for blocking on another agent's field entry and selector/value for exact-value waiting.

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 states a specific verb and resource: wait/block until a condition is met or a duration elapses. It distinguishes the supported waiting modes clearly (selector+hasValue, selector, text, ms), so an agent can identify exactly what the tool does without opening the schema.

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?

It gives concrete usage guidance by mapping each waiting mode to an intent and explicitly recommends using this instead of repeatedly reading the page while waiting for another agent. It does not state when not to use it or describe failure/timeout behavior, but the positive routing guidance is strong.

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