Skip to main content
Glama
WhiteNightShadow

camoufox-reverse-mcp

wait_for

Pause execution until a specified element appears on the page or a network request matching a URL pattern is detected. Define a timeout to control wait duration.

Instructions

Wait for an element to appear or a network request matching a URL pattern.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNo
url_patternNo
timeoutNo

Implementation Reference

  • Handler function for the 'wait_for' MCP tool. Waits for a DOM element (via selector) or a URL pattern match on the active page.
    @mcp.tool()
    async def wait_for(
        selector: str | None = None,
        url_pattern: str | None = None,
        timeout: int = 30000,
    ) -> dict:
        """Wait for an element to appear or a network request matching a URL pattern."""
        try:
            page = await browser_manager.get_active_page()
            if selector:
                await page.wait_for_selector(selector, timeout=timeout)
                return {"status": "found", "selector": selector}
            elif url_pattern:
                await page.wait_for_url(url_pattern, timeout=timeout)
                return {"status": "matched", "url_pattern": url_pattern}
            else:
                return {"error": "Provide either selector or url_pattern"}
        except Exception as e:
            return {"error": str(e)}
  • Input schema/type annotations for the wait_for tool: optional selector (str), optional url_pattern (str), and timeout (int, default 30000ms).
    async def wait_for(
        selector: str | None = None,
        url_pattern: str | None = None,
        timeout: int = 30000,
    ) -> dict:
  • Registration of wait_for as an MCP tool via the @mcp.tool() decorator on the FastMCP instance 'mcp' from server.py.
    @mcp.tool()
Behavior2/5

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

With no annotations, the description carries full burden but only states the basic action. It does not disclose timeout behavior, return values, error handling, or whether both conditions are OR or AND.

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?

The description is a single concise sentence (14 words) with no redundancy. Every word adds value.

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?

Given the tool complexity (two waiting conditions, three parameters, no output schema), the description is insufficient. It lacks details on return values, errors, and usage context.

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 has 0% description coverage. The description partially compensates by linking selector to element and url_pattern to network request, but it does not explain the timeout parameter or clarify mutual exclusivity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool waits for either an element to appear or a network request matching a URL pattern. It uses specific verbs ('wait for') and resources ('element', 'network request'), and distinguishes itself from siblings by covering both conditions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like get_network_request or intercept_request. There is no mention of when not to use it or any prerequisites.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/WhiteNightShadow/camoufox-reverse-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server