Skip to main content
Glama

browser_wait_for

Read-onlyIdempotent

Wait for a selector to appear OR a navigation URL to match a glob pattern. Provide ref (aria-ref or selector; frame = CSS selector of the it lives in) OR url_pattern (glob).

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": {
      "page_id": "<page_id>"
    },
    "name": "browser_wait_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
refNo
frameNo
page_idYes
timeout_msNo
url_patternNo
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / frame
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Frame"
      +}
  2. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  3. Added
  4. Removed
  5. Added
  6. Removed
  7. Added
  8. Removed
  9. Added
  10. Removed
  11. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered and the bar is lower. The description explains the blocking/waiting semantics and the iframe scoping, but never states what happens on timeout or what a successful wait yields. It adds modest context beyond the structured data without contradicting it.

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 short sentences, front-loaded with the two wait modes and followed by the parameter contract. No filler, no repetition of schema fields, and the OR relationship is easy to parse.

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 6-parameter wait tool with no output schema, the description covers the mode selection and the two scoping parameters well, and annotations cover safety and idempotency. The remaining gap is timeout behavior and the required `page_id`, which an agent must learn from the schema alone.

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 only 17%, so the description is expected to carry the load, and it does explain `ref` (aria-ref or selector), `frame` (CSS selector of the containing iframe) and `url_pattern` (glob). However, the required `page_id` and the `timeout_ms` parameter (default 10000) get no mention at all in the description, leaving half the parameters unexplained. Useful partial compensation, but incomplete.

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) and two explicit conditions: a selector appearing, or a navigation URL matching a glob. That is far more precise than the bare name, and an agent can tell what the tool accomplishes without opening the schema. It stops short of distinguishing itself from the similarly named sibling browser_wait_for_response, so it does not earn a 5.

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?

Adds real routing guidance by stating the caller must supply `ref` OR `url_pattern`, which clarifies that the two modes are alternatives rather than cumulative. It gives no guidance on when to choose this tool over browser_wait_for_response or browser_check, and no preconditions (page must be open, etc.). Usage is implied by the parameter exclusivity only.

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.