Skip to main content
Glama
@yawlabs/electron-mcp

@yawlabs/electron-mcp

Official
by YawLabs

electron_audit_security

Read-onlyIdempotent

Audits Electron app source files against an official security checklist, detecting insecure BrowserWindow, IPC, CSP, and version settings and flagging items that need runtime or packaging review.

Instructions

Audit an Electron app against the official security checklist. Covers 19 of the items that can be detected from static inputs (BrowserWindow configuration, main process code, package.json, preload, HTML): HTTPS-only content, nodeIntegration, contextIsolation, sandbox, webSecurity, CSP, allowRunningInsecureContent, experimentalFeatures, enableBlinkFeatures, raw ipcRenderer exposure, direct window assignment, @electron/remote, supported Electron version, shell.openExternal validation, file:// usage, tag, will-navigate handler, setWindowOpenHandler, and IPC sender validation. The remaining checklist items (session permissions, fuse configuration) require runtime / packaging context and are flagged in the report's footer.

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

Input Schema

NameRequiredDescriptionDefault
mainCodeNoMain process code -- used to detect non-HTTPS URLs in loadURL/loadFile calls
htmlContentNoContent of the main HTML file to check CSP meta tags
packageJsonNoContent of package.json to check Electron version and dependencies
preloadCodeNoContent of the preload script
electronVersionNoElectron major version if not in package.json (e.g. '41')
browserWindowConfigNoBrowserWindow constructor options as a JSON string or code snippet

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.7.2
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv1.2.13

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so safety is covered; the description earns credit by adding that only statically detectable items are checked and that un-checkable items are flagged in the report footer rather than silently omitted. It does not disclose what happens when inputs are missing (all six parameters are optional) or what the report contains, 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?

The purpose is front-loaded in the first sentence, followed by coverage and then exclusions in a logical order. The long 19-item enumeration is dense but earns its place by telling the agent exactly which rules fire; it could be tightened but is not padding.

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 read-only audit tool with full schema coverage and no output schema, the description gives enough: what it checks, what it cannot check, and where gaps are reported. The main residual hole is behavior with zero or partial inputs and the shape/severity of the returned report, which the agent has to discover by calling it.

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 each parameter is already documented with its purpose and 500k maxLength constraints, making 3 the baseline. The description reinforces the input mapping ('BrowserWindow configuration, main process code, package.json, preload, HTML') but adds no per-parameter meaning beyond that, and never mentions the electronVersion fallback parameter.

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?

The description opens with a specific verb and resource ('Audit an Electron app against the official security checklist') and then enumerates the exact 19 checks performed, so an agent knows precisely what class of findings to expect. It also bounds the scope to static-input analysis and states that runtime/packaging items are excluded, which is the kind of scoping that separates it from a general linter.

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: 'detected from static inputs' tells the agent this is a static audit, and the footer note about session permissions and fuse configuration implicitly points elsewhere (e.g. electron_configure_fuses). However, no sibling is named, no prerequisites are given, and nothing says when to prefer this over electron_lint_security or electron_audit_ipc_security.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.