Skip to main content
Glama
Electron Debug MCP Server

Electron Debug MCP Server

by amafjarkasi

leak_check

Detects memory leaks by running garbage collection, measuring DOM and heap counters, repeating an action or wait, and reporting retained node, listener, and heap growth.

Instructions

Memory leak detector: triggers garbage collection, measures baseline DOM and heap counters, repeats an action or wait, runs GC again, and reports retained node/listener/heap growth.

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

Input Schema

NameRequiredDescriptionDefault
targetIdNo
processIdNoProcess ID. If omitted, uses the single running app.
iterationsNoNumber of test action iterations (default: 3)
actionScriptNoOptional JavaScript expression evaluated in the renderer on each iteration
captureSnapshotsNoWhether to capture heap snapshot files before and after (default: false)

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 declare destructiveHint=false, so the description carries most of the burden and does well: it discloses that GC is forced, that an action is repeated N times, and that heap snapshots may be written to disk. It does not warn that the actionScript executes in the renderer and can itself mutate app state, nor how long a run may take.

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 that leads with the tool's identity and then walks the procedure in order. Dense but every clause carries information; a short clause on cost or prerequisites would still fit without bloat.

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?

With no output schema, the description correctly closes the loop by saying what is reported (retained node/listener/heap growth). For a 5-parameter diagnostic tool the remaining gap is runtime cost and the fact that the target app must be running, which the schema only partially covers via processId.

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 80%, so the baseline is 3. The phrase 'repeats an action or wait' usefully implies that omitting actionScript makes iterations pure waits, which is real added meaning, but nothing is said about targetId/processId scoping beyond what the schema already documents.

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?

Names a specific resource and verb ('Memory leak detector') and then spells out the exact procedure: GC, baseline DOM/heap counters, repeated action, GC again, report retained growth. That level of detail clearly separates it from generic siblings like evaluate, assert_ui, or diagnose.

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?

The purpose implies when to use it (diagnosing retained memory across repeated interactions), but there is no explicit when-to-use statement, no prerequisites, and no naming of an alternative such as diagnose or evaluate for non-leak investigations. Usage is inferable rather than stated.

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