Skip to main content
Glama
camoufox-agent

camoufox-agent

by VolanDeVovan

wait_for

Read-only

Halts browser actions until specified page conditions—text, selector, URL, page change, or network idle—are met, returning the first match or an error on timeout.

Instructions

Wait until one of the given conditions holds; the first match wins and is named in the reply. A timeout is an error. Conditions: text appears, text_gone disappears, a CSS selector is visible, the URL contains a substring (or matches a * pattern), the page changed, the network is idle.

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_for"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoWait for the tab's URL to contain this, or to match it when it has * wildcards.
textNoWait for this text on the page (case-insensitive).
tabIdNoTab to act on, from tabs_context. Omitted: this session's active tab. Pass it always when several agents share the session.
selectorNoWait for a CSS selector to be visible.
text_goneNoWait until this text is no longer on the page (a spinner, 'Loading...').
timeout_sNoSeconds to wait (default 10).
network_idleNoWait for no request in flight for 500 ms.
page_changedNoWait for the page to change (navigation, DOM size, text).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the readOnlyHint annotation, it discloses two behaviorally important facts that are not in the schema: the first satisfied condition wins and is named in the reply, and a timeout is treated as an error rather than a silent success. It does not say whether a timeout raises an exception or returns an error result, nor how frequently conditions are polled.

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 sentences, front-loaded with the wait semantics and the first-match/timeout rules before the condition inventory. The condition list partially duplicates the parameter descriptions, but it functions as a scannable overview rather than padding.

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 an eight-optional-parameter, zero-output-schema tool, the description covers the main call contract, but leaves gaps an agent would care about: what happens if no condition is given, what exactly the reply contains (only that the winning condition is 'named'), and the interaction between network_idle here and the wait_for_network sibling.

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 100%, so per-parameter meaning is already documented; the description mainly restates the condition types in prose. It does add one genuine semantic point the schema lacks — the precedence rule when multiple conditions are passed — which is why this sits at the baseline 3 rather than below it.

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 resource — block until one of several page-state conditions holds — and enumerates the condition types, so an agent knows exactly what class of waiting it covers. It does not explicitly distinguish itself from the sibling wait_for_network, even though network idle is one of its own conditions.

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 implied by the condition list: use it to synchronize on text, selector, URL, page change, or network state rather than guessing with sleeps. There is no explicit guidance on when to prefer the dedicated wait_for_network tool or on what to do when several conditions are supplied beyond 'first match wins'.

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