Skip to main content
Glama
playwright-mcp-router

playwright-mcp-router

by huangzt

browser_handle_dialog

Destructive

Accept or dismiss browser dialogs, supplying prompt text when needed, so automated sessions can proceed past alerts, confirmations, and prompts.

Instructions

Handle a dialog

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": {
      "session": "<session>",
      "accept": "<accept>"
    },
    "name": "browser_handle_dialog"
  }
}

Input Schema

NameRequiredDescriptionDefault
colorNoOptional Chrome tab group color override for a newly created session.
acceptYesWhether to accept the dialog.
accountNoChrome account profile to use (defaults to 'default'). Configured accounts: 'default' (Isolated Browser).default
sessionYesRequired isolated session name (also displayed as the Chrome tab group title), e.g. "T1867-api-debug" or "home-css". Use a unique, descriptive task name per conversation so concurrent agents never hijack each other's active tab.
promptTextNoThe text of the prompt in case of a prompt dialog.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

D1.7/5.0
Behavior1/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true, and openWorldHint=true, so the destructive nature is documented structurally. The description adds nothing beyond that — no mention of what accepting a dialog commits the page to, whether a dialog must be pending first, or what happens if none exists.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is short, but that brevity reflects under-specification rather than efficiency. The single fragment carries no actionable information and leaves the agent to reconstruct intent from the schema and annotations alone.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a five-parameter, destructive, open-world browser tool with no output schema, this description is completely inadequate. It provides no explanation of dialog types, the accept/dismiss decision, the promptText requirement for prompt dialogs, or expected post-action state.

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%, so parameters like 'accept', 'promptText', and 'session' are already well documented in the schema. The description contributes no additional meaning, but per the baseline rule for high-coverage schemas, a 3 is appropriate.

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

Purpose2/5

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

The description is a verbatim restatement of the annotation title: 'Handle a dialog.' 'Handle' is ambiguous — it does not say whether the tool accepts, dismisses, or reads a dialog, nor does it name the dialog types (alert/confirm/prompt) that the schema implies via the 'accept' and 'promptText' parameters.

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

Usage Guidelines1/5

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

There is no guidance whatsoever on when a dialog tool should be invoked, what triggers a dialog, or how it relates to sibling tools like browser_click or browser_press_key that might also interact with page overlays. The agent is left to infer everything.

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