Skip to main content
Glama

chrome_handle_dialog

Accept or dismiss JavaScript alert, confirm, and prompt dialogs in Chrome and enter prompt text when needed to continue browser automation.

Instructions

Accept or dismiss a JavaScript dialog (alert, confirm, prompt)

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": "chrome_handle_dialog"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabIdNo
acceptYestrue to accept, false to dismiss
promptTextNoText to enter for prompt dialogs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and it does not meet it. It never says that dialogs block page execution, what error or no-op results when no dialog is present, or how tabId resolves which tab's dialog is handled.

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 zero filler, naming the action before the parenthetical detail. It is appropriately terse, though the same length could have carried one clause of behavioral context.

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 3-parameter interaction/control tool with no annotations and no output schema, the definition leaves significant blanks: tab targeting, failure when no dialog is open, and any return value indicating acceptance. Only the core action is covered.

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 67%: accept and promptText are already described in the schema, and the mention of 'prompt' dialogs only loosely reinforces promptText. The tabId parameter has no description in either place, so the definition does not compensate for the remaining gap.

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 pair (accept/dismiss) against a specific resource (JavaScript dialog) and enumerates the dialog types alert, confirm, prompt. No sibling tool handles dialogs, so the resource name alone differentiates it sufficiently.

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: the agent must infer it should call this when a dialog blocks the page. There is no guidance on prerequisites (a dialog must actually be open), on what happens if no dialog exists, or on ordering relative to navigate/click.

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