Skip to main content
Glama

Handle dialog

browser_dialog

Accept or dismiss open browser alert, confirm, or prompt dialogs to clear blocking popups and continue automated page interactions.

Instructions

Accept or dismiss an open alert/confirm/prompt 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": {
      "accept": "<accept>"
    },
    "name": "browser_dialog"
  }
}

Input Schema

NameRequiredDescriptionDefault
acceptYes
expectNoExpectSpec postconditions
pageIdNo
sessionNo
snapshotNoPage state returned after the action: diff (default), full, none
promptTextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.1/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and openWorldHint=true, so the mutation/safety profile is covered. Beyond that the description adds almost nothing: it does not say what happens to text typed into a prompt when the dialog is dismissed, whether the call fails when no dialog is open, or how the three dialog types differ in behavior.

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?

A single front-loaded sentence with zero filler; the action and the target are stated before anything else. Nothing in it could be trimmed without losing meaning.

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?

With six parameters, low schema coverage, and no output schema, the description is thinner than the tool's complexity warrants — the snapshot/expect postcondition behavior and the accept/promptText relationship go undocumented. It is still sufficient to identify the tool's purpose, so it is not wholly inadequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 33%, so the description needed to compensate and does not. Most importantly, the required 'accept' boolean is never mapped to accept-vs-dismiss, and 'promptText' is never tied to prompt dialogs (when it is required or ignored), leaving the two parameters that actually determine correct invocation unexplained.

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 pair (accept/dismiss) and a precise resource (an open alert/confirm/prompt dialog), which is enough for an agent to tell that this is the dialog-handling tool rather than a page-interaction tool. It does not, however, distinguish itself from any named sibling or state where dialog handling fits in a workflow.

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?

Usage is only implied by the precondition 'open ... dialog' — the agent can infer it should call this when a dialog is blocking the page. There is no explicit when-not guidance (e.g., what to do if no dialog is present, or how this relates to tools that might trigger a dialog) and no named alternatives.

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