Skip to main content
Glama
Electron Debug MCP Server

Electron Debug MCP Server

by amafjarkasi

print_pdf

Idempotent

Converts an Electron page to a PDF file using Chrome DevTools or a webContents fallback, with background printing enabled by default and the result registered as an artifact.

Instructions

Write the page to a PDF. Uses Page.printToPDF, and falls back to webContents.printToPDF when that method is missing (needs inspectMain). printBackground defaults to true. Also registers as an artifact resource.

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

Input Schema

NameRequiredDescriptionDefault
pathNo
targetIdNo
landscapeNo
processIdNoProcess ID. If omitted, uses the single running app.
printBackgroundNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.15.1

TDQS

B3.4/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, idempotentHint=true) the description adds real behavioral context: the underlying CDP method, the fallback path and its inspectMain dependency, the printBackground default, and the fact that output is registered as an artifact resource. It doesn't disclose where the file lands when path is omitted, which keeps it from a 5.

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, front-loaded sentences with no filler; the operation statement comes first and the implementation/fallback detail follows. Terms like "inspectMain" are unexplained jargon but are not wasted words.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter write tool with no output schema, the description covers the execution path and the artifact-registration side effect, which are the non-obvious parts. It leaves the return value (path, buffer, artifact id) and three of five parameters undocumented, so it is adequate but not complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 20% (5 params, only processId described in the schema). The description adds meaning only for printBackground (defaults true); path, targetId, and landscape receive no explanation in either place, so the description fails to compensate for the coverage gap.

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?

"Write the page to a PDF" is a specific verb+resource and immediately tells an agent what the tool produces, distinguishing it from capture/export siblings such as capture_mhtml. It doesn't explicitly contrast itself with those siblings, so it stops short of a 5.

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: the fallback note ("needs inspectMain") hints at a prerequisite/precondition, but there is no explicit when-to-use vs. when-not, and no routing to alternatives like capture_mhtml or export_har.

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