Skip to main content
Glama

browser_dialog_handle

Accept or dismiss JavaScript alert, confirm, and prompt dialogs, optionally entering text for prompts, to continue browser automation without dialog interruptions.

Instructions

Handle a JavaScript dialog (alert, confirm, or prompt) by accepting or dismissing it

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": {
      "action": "<action>"
    },
    "name": "browser_dialog_handle"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesDialog action: accept or dismiss
promptTextNoText to enter in a prompt dialog

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the tool accepts or dismisses dialogs and that prompt dialogs can receive text, but it omits important behavior such as whether dialogs block page execution, what happens when no dialog is present, or whether the action is confirmed in the response.

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 a single efficient sentence with the core purpose front-loaded. It contains no filler, though the phrasing could be slightly more structured to separate action from applicability.

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?

For a two-parameter tool with full schema coverage and no output schema, the description covers the basic operation. However, it leaves out operational context like dialog blocking behavior and error conditions that an agent would need to invoke it confidently in edge cases.

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 both the action enum and promptText are already documented in the schema. The description does not add parameter-level meaning beyond what the schema provides, making a baseline 3 appropriate.

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?

The description states a specific verb (handle) and resource (JavaScript dialog), naming the three dialog types and the two possible actions. It is clear without opening the schema, though it does not explicitly differentiate itself from siblings such as browser_press_key or execute_script.

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 the tool is used when a JS dialog appears and the agent must accept or dismiss it. It does not state prerequisites (such as a dialog needing to be open) or explain when to choose another tool over this one, leaving usage largely inferred.

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