Skip to main content
Glama
Electron Debug MCP Server

Electron Debug MCP Server

by amafjarkasi

evaluate

Execute JavaScript expressions in an Electron target via CDP Runtime.evaluate, defaulting to the first page or renderer target.

Instructions

Evaluate JavaScript in an Electron target via CDP Runtime.evaluate. Defaults to the first page/renderer target.

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": {
      "expression": "<expression>"
    },
    "name": "evaluate"
  }
}

Input Schema

NameRequiredDescriptionDefault
roleNoPreferred target role when targetId is omitted (default page)
targetIdNo
processIdNoTarget process ID. Omit if only one app is running.
expressionYesJavaScript expression to evaluate
returnByValueNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.15.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare openWorldHint=true and destructiveHint=false; the description adds useful mechanism context (CDP Runtime.evaluate) and default target behavior. However, it never warns that the expression is arbitrary code with potential side effects, nor explains the returnByValue toggle, which matters for a tool whose blast radius is essentially unbounded.

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?

Two short sentences, front-loaded with the action and mechanism, with the default behavior immediately after. No filler.

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 5-parameter tool with no output schema, the definition covers the core action and default target resolution adequately. Gaps are limited to return-value semantics (returnByValue) and the processId/targetId interaction, which are secondary to correct invocation.

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 60%, with targetId and returnByValue undocumented there. The description compensates partially by explaining that target selection falls back to the first page/renderer target, but adds nothing about returnByValue or how processId interacts with targetId.

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?

Names a specific verb and resource ("Evaluate JavaScript") plus the exact mechanism (CDP Runtime.evaluate) and the default target selection, so the operation is unambiguous. It does not explicitly differentiate itself from the sibling evaluate_main, leaving the page-vs-main-process distinction implicit in "first page/renderer target".

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains the default target when targetId is omitted, but gives no when-to-use/when-not guidance beyond that and does not state what to do for main-process or worker contexts. An agent must infer the boundaries from the sibling names available elsewhere.

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