Skip to main content
Glama
yogesh-joshi-0333

browser-control-mcp-server

Handle Browser Dialog

browser_handle_dialog

Auto-accept or dismiss JavaScript alert, confirm, and prompt dialogs. Call before actions that open dialogs, and provide prompt text to enter before accepting.

Instructions

Handle JavaScript alert(), confirm(), and prompt() dialogs. Call this BEFORE triggering an action that shows a dialog (e.g. before clicking a delete button that shows a confirm). The handler will auto-accept or auto-dismiss the next dialog that appears. For prompt() dialogs, provide promptText to enter text before accepting. If a dialog is already showing, it will be handled immediately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNoForce a specific mode.
actionYesAccept or dismiss the dialog
sessionIdNoPuppeteer session ID. Skips mode selection.
promptTextNoText to enter if the dialog is a prompt()

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.5.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that the handler auto-accepts/auto-dismisses the NEXT dialog (one-shot semantics), that promptText is applied before accepting, and that an already-visible dialog is handled immediately. It omits edge behavior such as timeouts or what happens if no dialog appears, which keeps it from a 5.

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?

Four short sentences, front-loaded with the purpose before the usage timing, with no redundant or filler content. Every sentence contributes actionable information.

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

Completeness4/5

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

For a mutating browser-interaction tool with no annotations and no output schema, the description covers purpose, timing, and the prompt-text special case well. It could go slightly further on failure/timeout behavior, but nothing critical for correct invocation is missing.

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 the schema already documents action, mode, sessionId, and promptText. The description adds only a light reinforcement of promptText's condition ('if the dialog is a prompt()'), so the baseline of 3 is appropriate.

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 opens with a specific verb+resource pairing ('Handle JavaScript alert(), confirm(), and prompt() dialogs'), covering the full scope of dialog types and clearly distinguishing it from sibling tools like browser_click or browser_type.

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

Usage Guidelines5/5

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

It explicitly states when to call it ('BEFORE triggering an action that shows a dialog'), gives a concrete example (clicking a delete button that shows a confirm), and explains the alternative case (calling when a dialog is already showing). This is the kind of when/when-not guidance that lets an agent route correctly.

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