Skip to main content
Glama
Electron Debug MCP Server

Electron Debug MCP Server

by amafjarkasi

handle_dialog

Auto-accept or dismiss the next JavaScript alert, confirm, or prompt dialog in an Electron app; set clear to disarm the automatic response.

Instructions

Auto accept or dismiss the next JavaScript dialogs (alert/confirm/prompt). clear:true disarms.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "handle_dialog"
  }
}

Input Schema

NameRequiredDescriptionDefault
clearNo
actionNo
targetIdNo
processIdNoTarget process ID. Omit if only one app is running.
promptTextNoValue when accepting a prompt

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.15.1

TDQS

A3.5/5.0
Behavior3/5

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

Annotations only supply destructiveHint=false, so the description carries most of the burden and usefully discloses that the behavior applies to the *next* dialog (one-shot) and that clear:true disarms. It does not state whether the handler persists across multiple dialogs, when it is armed relative to navigation, or what happens if no dialog appears.

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?

Two short sentences, front-loaded with the primary action; the disarm flag is appended efficiently. 'Disarms' is slightly jargon-y and unexplained, but nothing is wasted.

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?

Given 5 optional parameters, a 40% schema coverage and no output schema, the description covers the essential behavior plus the tricky clear flag. The remaining gaps (targetId, handler lifetime) are modest but real for a tool that silently alters browser behavior.

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 40% (processId and promptText documented in-schema); the description compensates for the most consequential one by explaining clear:true disarms, and action is self-evident from 'accept or dismiss'. targetId remains unexplained in both places, and promptText's role is only implicit.

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 concrete action pair (accept or dismiss) against a specific resource (JavaScript dialogs: alert/confirm/prompt). It is clear enough to separate from siblings like click or evaluate, though it never names an alternative tool.

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 implied rather than stated: you arm a handler so the *next* dialog is resolved automatically, and clear:true un-arms it. There is no explicit when-to-use/when-not guidance nor any named alternative for dialog handling.

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