Skip to main content
Glama

browser_handle_dialog

Accept or dismiss JavaScript dialogs like alert, confirm, and prompt, and enter optional prompt text to automate browser interactions.

Instructions

Handle or configure behavior for JavaScript dialogs (alert, confirm, prompt) with custom action and prompt text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoWhether to accept or dismiss dialogaccept
prompt_textNoOptional text to enter for window.prompt

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

C2.9/5.0
Behavior2/5

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

With no annotations, the description carries full burden but discloses nothing beyond the schema. It does not say whether the tool waits for a dialog, errors if none exists, what accept/dismiss actually does, or whether prompt_text is ignored for non-prompt dialogs.

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?

A single front-loaded sentence with no wasted words. It could be slightly more precise about 'handle' versus 'configure', but it is efficient.

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?

For a tool with no annotations and no output schema, the description omits operational context about when dialogs are handled and what the tool returns or affects. The schema covers parameters, but the description does not compensate for the missing behavioral and usage information.

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 defines both parameters. The description mentions 'custom action and prompt text' but adds no format, default behavior, or constraint beyond what the schema provides.

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

Purpose4/5

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

States a specific verb ('Handle') and resource ('JavaScript dialogs') and enumerates dialog types. It is clear what the tool does, but it does not differentiate itself from any sibling or mention when dialogs arise relative to navigation or click flows.

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 when-to-use guidance is provided. The description does not say to call this when a dialog is present, nor does it name prerequisites, alternatives, or consequences of choosing accept versus dismiss beyond the schema enum.

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