Skip to main content
Glama

wait

Pauses execution until page text appears or disappears, a URL contains a string, or a fixed delay elapses—useful for syncing browser automation with dynamic content.

Instructions

Wait until text appears (or is gone) or the URL contains a string; or sleep 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"
  }
}

Input Schema

NameRequiredDescriptionDefault
msNo
tabNoTab id. Default: your own target tab (each agent session gets its own)
urlNo
goneNo
textNo
browserNochrome, edge, ... (only when several browsers are connected)
timeoutNo
snapshotNoDefault returns a diff of what changed. true = full snapshot, false = nothing

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations exist, so the description carries the full burden, yet it says nothing about what happens on timeout (throw vs. return false), whether there is a default timeout, whether the call blocks, or what the result value looks like. The only behavioral hint about return data lives in the schema's 'snapshot' description, not in the description itself.

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 compact sentence with no filler and the primary verb front-loaded. The semicolon-chained modes make it slightly dense, but nothing is wasted.

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

Completeness2/5

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

For an 8-parameter, zero-annotation, no-output-schema tool, the description leaves out timeout semantics, failure behavior, mode exclusivity, and the snapshot/diff return behavior that materially affects how an agent reads the result. It names the conditions but not the contract.

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 38%, so the description must compensate; it does explain the meaning of ms, text, gone and url, which are the four semantic parameters. However, 'timeout' is undocumented in both places and the relationship between text/gone/url/ms (which combinations are valid, and that ms is a fallback sleep) is only gestured at with 'or'.

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 uses a specific verb ('Wait') and enumerates three concrete conditions: text appears, text is gone, URL contains a string, or a plain sleep in ms. An agent can tell this is a synchronization primitive rather than an action tool, though it never explicitly contrasts itself with the sibling 'watch'.

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?

Usage is only implied: the reader must infer that this is called after navigate/click to await page state. There is no statement of when to pick this over 'watch', no note that the mode parameters are mutually exclusive, and no guidance on required preconditions such as having a target tab.

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