Skip to main content
Glama
CapMonsterCloud

capmonster-mcp-patchright

Official

browser_handle_dialog

Accept or dismiss JavaScript alert, confirm, and prompt dialogs, with optional text input and wait mode to handle the next dialog automatically.

Instructions

Accept or dismiss a JavaScript dialog (alert / confirm / prompt).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitNoWhen true, wait for and handle the next dialog before returning. Default false arms a one-shot handler for the next action.
acceptYestrue = accept, false = dismiss
timeoutNoMilliseconds to wait when wait=true
promptTextNoText to enter for prompt dialogs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.4/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does not mention the default one-shot handler behavior, the effect of wait and timeout, what happens if no dialog is present, or any error conditions. The schema provides some parameter details, but the description itself is too skeletal to give an agent confidence about the tool's runtime behavior, especially since it mutates UI state (accepting/dismissing) without disclosing side effects or reversibility.

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?

The description is extremely concise, a single sentence with the core purpose front-loaded. There is no fluff or redundancy. It earns a 4 because while it is appropriately brief, it could have included a bit more operational context without becoming verbose, but the structure itself is optimal for quick parsing.

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?

The tool is simple (4 params, no output schema), and the schema explains parameters well. However, the description lacks usage context such as 'call this when a dialog is blocking the page' or notes about the one-shot behavior. It does not explain the interaction with preceding actions or what happens when no dialog exists. For an agent to use it correctly, more context is needed, so completeness is only adequate.

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 100%, and the schema already explains all four parameters (wait, accept, timeout, promptText) with clear descriptions. The tool description does not add any additional parameter semantics beyond the schema. Per the rubric, the baseline is 3 since schema does the heavy lifting, and the description adds no extra value here.

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's action ('Accept or dismiss') on a specific resource ('a JavaScript dialog') and enumerates the dialog types (alert / confirm / prompt). This is specific and distinguishable from sibling browser tools, which cover navigation, clicking, filling, etc., so an agent can easily identify when this tool applies.

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?

The description implies usage when a JavaScript dialog appears, but provides no explicit guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or exclusions. It is clear from the name and description that this is the tool for dialogs, but there is no explicit routing or edge-case advice, so it falls short of a higher score.

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