Skip to main content
Glama

browser_handle_dialog

Manage browser alert, confirm, and prompt dialogs by checking status, then accepting or dismissing pending dialogs to continue automation.

Instructions

Call action=status before triggering alert/confirm/prompt to start observing dialogs. Then explicitly accept or dismiss a pending dialog. Does not handle native file pickers or browser security prompts.

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_handle_dialog"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabIdNoOptional browser tab id to act on instead of the focused tab.
actionYes
promptTextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.6.0

TDQS

A3.8/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 disclose the most non-obvious trait: observation must be armed via action=status before the dialog appears, otherwise dialogs are presumably not captured. It also scopes out unsupported dialog types, which prevents wasted calls. It does not explain failure behavior (e.g., accepting when no dialog exists) or what status returns.

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?

Three short sentences, with the critical ordering prerequisite front-loaded, followed by the action semantics and the scope exclusions. Minimal filler; 'explicitly' adds little, and the first sentence is slightly convoluted but still readable.

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 3-parameter tool with no annotations and no output schema, the description covers the stateful workflow and out-of-scope dialogs but leaves the promptText parameter and any return/error semantics undocumented. An agent could invoke it correctly in the common case but would guess on prompt text handling.

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 coverage is only 33%, and the description clarifies the meaning of the action enum values in context (status arms observation; accept/dismiss resolve a pending dialog). However, promptText is left entirely unexplained — neither schema nor description says it applies only to prompt dialogs or what happens if it is omitted when accepting a prompt.

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 names the resource (pending dialogs: alert/confirm/prompt) and the concrete operations (status, accept, dismiss), so the agent knows exactly what the tool acts on. It also sketches the boundary against siblings by excluding native file pickers and browser security prompts, though it never names the alternative tool (e.g., browser_upload_file).

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?

It gives an explicit when-to-use rule (call action=status before triggering a dialog to start observing) and a when-not rule (no native file pickers, no security prompts). It stops short of naming which sibling to use for the excluded cases or what to do if no dialog is pending.

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