Skip to main content
Glama

Wait

browser_wait
Read-onlyIdempotent

Wait briefly for page activity. ms (or durationMs) must be 0–30000; negative values are INVALID_ARGUMENT. Values above 30000 are INVALID_ARGUMENT. Sending both ms and durationMs is INVALID_ARGUMENT. The result reports waitedMs and clamped. clamped is true only when the requested ms was reduced, and then the result includes requestedMs and reason (for example the command timeout budget). A value inside 0–30000 that finishes is not clamped. The call is allowed 35 seconds so a 30000 ms wait does not return EXTENSION_TIMEOUT. If urlIncludes is set and the tab URL does not contain it before the wait ends, the call returns TIMEOUT. After release_control, wait returns HUMAN_HAS_CONTROL even if a JavaScript dialog is still open. While the agent has control and a JavaScript dialog is open, wait returns DIALOG_PENDING. A second release returns ALREADY_RELEASED.

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": {
      "sessionId": "<sessionId>"
    },
    "name": "browser_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
msNoWait duration in milliseconds (0–30000).
sessionIdYes
durationMsNoAlias for ms (0–30000). Do not send both.
urlIncludesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior5/5

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

With annotations limited to the safe/idempotent profile, the description carries real weight and does: it enumerates the exact error codes the call can produce (INVALID_ARGUMENT, TIMEOUT, HUMAN_HAS_CONTROL, DIALOG_PENDING, ALREADY_RELEASED, EXTENSION_TIMEOUT), describes the clamping behavior and its conditions, and explains the 35s call budget relative to the 30s max wait. That is precisely the context annotations cannot express.

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?

Front-loaded with the purpose and then ordered by argument, then result, then error conditions — a sensible progression. Some sentences restate the schema's numeric bounds ('values above 30000 are INVALID_ARGUMENT', 'a value inside 0–30000 that finishes is not clamped'), which is the main slack in an otherwise dense block.

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

Completeness5/5

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

There is no output schema, and the description steps in to describe the result shape (waitedMs, clamped, and requestedMs/reason when clamped), which is exactly what an agent needs to interpret the return value. Error-state coverage across human control, dialogs, and release is also complete for this tool.

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 50%, and the description compensates well for the undocumented parts: it explains that ms and durationMs are aliases, that sending both is INVALID_ARGUMENT, and gives urlIncludes real semantics (TIMEOUT if the tab URL does not contain it before the wait ends). It does not touch sessionId, and much of the bounds text duplicates the schema's min/max.

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 object: wait for page activity, with a duration bound. The opening sentence is clear enough to distinguish it from navigation/click siblings, though it never contrasts itself with browser_observe or browser_get_status, which are the nearest alternatives for 'something is happening, check it'.

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 by 'wait briefly for page activity' and by the conditional urlIncludes behavior. Nothing says when to choose browser_wait over browser_observe, or when waiting is unnecessary; the agent must infer that from the sibling names.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.