Skip to main content
Glama

browser_handle_dialog

Destructive

Accept or dismiss blocking JavaScript dialogs (alert, confirm, prompt, beforeunload) to unblock the page. Optionally enter prompt text and get a snapshot.

Instructions

Accept or dismiss the JavaScript dialog (alert, confirm, prompt, beforeunload) that is blocking the page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
acceptYestrue to press OK / accept, false to press Cancel / dismiss
snapshotNoAlso return the page snapshot after the action (default: no). Use it when you need to see the result right away.
promptTextNoText to enter into a prompt() dialog before accepting

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, openWorldHint=true, and readOnlyHint=false, so the safety profile is covered. The description adds useful behavioral context by stating that the dialog is blocking the page and listing dialog types, though it does not detail side effects of accepting beyond what annotations imply.

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 front-loaded sentence with zero waste. It states the action and the key condition without unnecessary words.

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?

Given rich annotations and full schema coverage, the description is largely complete for selecting and invoking the tool. It could optionally mention the snapshot behavior or promptText only applying to prompt dialogs, but those are adequately covered by the schema.

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 accept, snapshot, and promptText in detail. The description adds no parameter-level meaning beyond what the schema provides, making the baseline 3 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?

States a specific verb pair (accept/dismiss) and resource (JavaScript dialog), enumerates dialog types (alert, confirm, prompt, beforeunload), and identifies the blocking condition. It clearly distinguishes itself from siblings like browser_click or browser_press_key by focusing on modal dialogs.

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

Usage Guidelines4/5

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

The description implies the usage condition clearly: use when a JavaScript dialog is blocking the page. It does not name alternatives or exclusions, but no sibling tool handles dialogs, so the context is sufficiently clear.

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