Skip to main content
Glama
Electron Debug MCP Server

Electron Debug MCP Server

by amafjarkasi

set_permission

Allow or deny an Electron permission and grant it to the page via Browser.grantPermissions, returning the page's checked permission state. Useful for testing notification, media, or geolocation access.

Instructions

Allow or deny an Electron permission and grant it to the page via Browser.grantPermissions. Returns checked, the page's Notification.permission or equivalent. Requires inspectMain. Unlisted permissions are denied after the handler is installed.

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": {
      "permission": "<permission>",
      "grant": "<grant>"
    },
    "name": "set_permission"
  }
}

Input Schema

NameRequiredDescriptionDefault
grantYestrue allows the prompt, false denies it
probeNoIf true, query the page permission state and return it as checked
processIdNoProcess ID. If omitted, uses the single running app.
permissionYesElectron permission name, e.g. "notifications", "media", "geolocation"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.15.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only supply destructiveHint=false, so the description carries the behavioral load and does so well: it names the CDP call used, documents the return value, and discloses a non-obvious side effect (all unlisted permissions denied after installation). It stops short of stating durability, scope of the handler (per process vs global), and permission requirements.

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?

Four short sentences, front-loaded with the action and followed by return value, prerequisite, and caveat in descending priority. Nothing is redundant, though the sentences are somewhat telegraphic.

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?

No output schema exists, and the description compensates by naming the returned `checked` value and its source. Prerequisite, mechanism, and the denial side effect are all covered; only persistence and per-process scoping of the handler are left implicit.

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 all four parameters are already documented in the schema; baseline 3 applies. The description adds a little context by tying "checked" to the return value but does not explain probe's interaction with grant or what processId's omission fallback means beyond the schema text.

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 (allow/deny) and resource (Electron permission), plus the underlying mechanism (Browser.grantPermissions). This is clearly distinct from the set_cookie/set_clipboard/set_storage siblings, so an agent can select it without opening the schema.

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?

Gives one real prerequisite ("Requires inspectMain") and a scope caveat about unlisted permissions being denied once the handler is installed. It never says when to prefer this over alternatives such as emulate or electron_security_audit, so usage is implied rather than guided.

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