Skip to main content
Glama

page.handle_dialog

Accept or dismiss an open JavaScript dialog in the browser, optionally supplying prompt text, to unblock pages waiting on alert, confirm, or prompt responses.

Instructions

Accept or dismiss an open JavaScript 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": "page.handle_dialog"
  }
}

Input Schema

NameRequiredDescriptionDefault
acceptYes
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.
prompt_textNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

Annotations already declare that this is a non-read-only, open-world operation, so the safety profile is partly covered. The description adds that the target is an existing JavaScript dialog and that the action is either acceptance or dismissal, but it omits useful behavior such as how prompt_text applies, what happens when no dialog is present, and how the action is scoped.

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 no unnecessary wording. It is concise and easy to scan.

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 four-parameter mutation tool with partial schema coverage and no output schema, the description is too thin. It should at least clarify accept/dismiss semantics for the required boolean and the conditional role of prompt_text.

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 coverage is only 50%, and the required boolean accept and the prompt_text parameter have no descriptions in the schema. The description does not explain that accept=true accepts and accept=false dismisses, nor when prompt_text should be supplied.

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 or dismiss) and a specific resource (an open JavaScript dialog), so an agent can understand the operation. It does not explicitly distinguish itself from the sibling page.list_dialogs, but the action is still clear.

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?

The description gives no when-to-use guidance, no prerequisites such as needing a dialog to already be open, and no alternatives such as using page.list_dialogs first. Usage is only implied by the phrase 'an open JavaScript dialog'.

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

Deploy Server

Other Tools