Skip to main content
Glama
DB-25

arc-control-mcp

Handle Dialog

handle_dialog

Accept or dismiss blocking JavaScript dialogs (alert, confirm, prompt, beforeunload) in Arc tabs to resume page execution. Enter prompt text when accepting.

Instructions

Accept or dismiss the JavaScript dialog (alert, confirm, prompt, beforeunload) that is blocking a tab. While one is open the page cannot run anything, so other CDP tools say so and point here. For a prompt, prompt_text is what gets entered when accepting. Needs the DevTools engine.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesaccept presses OK, dismiss presses Cancel
tab_idNoArc tab id from list_tabs. Omit to use this agent's current tab. A tool that changes a tab will not fall back to the tab the user is looking at, so pass this or call open_url first.
prompt_textNoText to enter into a prompt() dialog when accepting

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-idempotent, open-world behavior, but the description adds real context: the dialog blocks page execution, other tools redirect here, and the DevTools engine is required. It does not cover failure behavior when no dialog exists, so it is strong rather than complete.

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?

Three sentences, front-loaded with the action and its target, then the blocking condition, then the prompt_text nuance. No filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/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 output schema, the description supplies the engine prerequisite, the blocking semantics, and when prompt_text matters. The only gap is expected behavior when a dialog is not actually open.

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 action, tab_id and prompt_text are already fully documented, including the accept/dismiss enum meaning and the tab fallback rule. The description's note that prompt_text applies when accepting largely restates the schema, so baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb pair (accept/dismiss) and a narrow resource (the JavaScript dialog), and enumerates the covered dialog types (alert, confirm, prompt, beforeunload). No sibling tool touches dialogs, so the agent can route here unambiguously.

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?

Explicitly gives the triggering condition: a dialog is open and the page cannot run anything, with other CDP tools pointing here. It also flags the DevTools-engine prerequisite. It stops short of stating what happens if no dialog is open or naming a fallback, so it is clear context rather than full when/when-not guidance.

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