Skip to main content
Glama

Wait

wait
Read-only

Pauses browser automation until a selector or text reaches the requested state, or for a fixed timeout, preventing brittle sleep loops after async UI changes.

Instructions

Wait for a selector or text to become visible, or wait a fixed number of milliseconds. Prefer this over sleep loops after triggering async UI.

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
textNo
stateNo
selectorNo
timeout_msNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

readOnlyHint=true already tells the agent this is a non-mutating operation, so the description's job is lighter. The description adds that it waits for visibility and implies a bounded wait, but never says what happens on timeout (error, false return, silent continue) or what the tool produces — a material gap for a wait primitive with no output schema.

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?

Two sentences, zero filler, with the primary capability front-loaded and the usage preference second. Every clause carries information the agent can act on.

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 read-only tool with four optional parameters, one enum, and no output schema, the description covers the core intent but omits failure semantics on timeout and the meaning of the non-visible states. An agent can invoke it, but cannot reliably predict or handle the outcome.

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 description coverage is 0%, so the description carries the burden and only partially succeeds: it maps conceptually to selector, text, and timeout_ms, but never explains the four-value state enum (attached/detached/visible/hidden) beyond "visible". It also does not clarify what happens when no parameters are supplied, despite there being zero required parameters.

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 (wait) plus two concrete modes: waiting for a selector/text to become visible, or waiting a fixed number of milliseconds. An agent can tell this is a synchronization primitive, not an action tool like click or navigate. It stops short of distinguishing itself from any specific sibling by name.

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?

"Prefer this over sleep loops after triggering async UI" gives a real when-to-use context, which is more than most definitions offer. However, it gives no guidance on choosing between the selector/text mode and the fixed-millisecond mode, and no exclusions or prerequisites are stated.

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