Skip to main content
Glama
CapMonsterCloud

capmonster-mcp-patchright

Official

browser_wait_for

Pause execution until a timeout elapses or a page element meets a specified state (attached, detached, visible, hidden) via selector or reference, including inside iframes.

Instructions

Wait for time or for selector/ref state. If no selector/ref, waits timeout milliseconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNo
stateNo
timeoutNo
selectorNo
frameSelectorNoOptional iframe CSS selector; selector/ref resolve inside it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.1/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the core behaviors: waiting for a duration or for selector/ref state, and the fallback when no selector/ref is given. It does not disclose what happens on timeout, whether it returns a value, what the default timeout is, or how selector and ref interact if both are provided.

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?

Two short, front-loaded sentences with no filler. The main behavior is stated first, followed by the important fallback logic. Could earn a 5 by adding a timeout-behavior note, but as written it is appropriately sized.

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?

This is a relatively simple tool with five optional parameters, no annotations, and no output schema, so the description must carry substantial context. It explains the basic wait modes but leaves unclear behavior on timeout, default values, whether state is required when selector/ref is supplied, and what the caller receives as a result. An agent may summon this tool correctly for simple cases but will have to guess in edge cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 20%, with frameSelector being the only documented parameter. The description adds minimal meaning by clarifying that timeout is in milliseconds and that selector/ref are the state targets, but it does not explain what ref is, what CSS selector syntax is expected, what state values imply, or what happens when state/timeout are omitted.

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 clear purpose: wait for a duration or for a selector/ref to reach a given state. Distinguishes the tool from action-oriented siblings by being a synchronization/wait operation. Lacks explicit contrast with any sibling, but no other wait tool exists in the list.

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?

Implies two usage modes: pass selector/ref plus state to wait for an element condition, or pass only timeout to wait a fixed duration. However, it gives no guidance on when to prefer this over polling with browser_find, browser_snapshot, or browser_evaluate, and no guidance on prerequisites such as needing an active page.

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