Skip to main content
Glama
iamvinitk
by iamvinitk

Launch Electron app via `npm run`

launch_via_npm

Spawn an Electron application by running an npm script, forwarding debug ports for remote debugging. Designed for electron-forge projects where the dev server starts first.

Instructions

Spawn an Electron application by running an npm script (typically start in an electron-forge project). Forwards --inspect-electron through forge and --remote-debugging-port / --inspect through to Electron. Use this for an electron-forge workspace (e.g. apps/electron) where forge's dev server needs to come up first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdYesDirectory to run `npm` in. Must contain package.json.
envNoEnvironment variables overlaid on the MCP process env.
nameNoDisplay name for the session.
debugPortNoCDP port for renderers (default: auto-pick 9222-9999).
workspaceNonpm --workspace target (e.g. `@scope/electron`). Omit when `cwd` already points at the workspace itself.
scriptNameNonpm script name (default: `start`).
inspectPortNoNode inspector port for main process (default: auto-pick).
waitTimeoutMsNoStartup timeout in ms (default 60000). Electron-forge dev start is slower than a direct binary launch because it rebuilds the renderer first.
Behavior3/5

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

With no annotations, the description carries full burden. It discloses flag forwarding behavior and slower startup due to rebuild. However, it omits key traits like process lifecycle (background, needs stop_app), return behavior, and error handling. Adequate but not comprehensive.

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?

The description is extremely concise: three sentences covering primary action, forwarding behavior, and usage context. No redundant words, main idea front-loaded. Excellent structure for quick comprehension.

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?

Given 8 parameters, no output schema, and no annotations, the description explains the primary use case and key behaviors. However, it lacks details on session management, return value, and post-conditions, which are important given the tool's complexity and sibling tools like 'stop_app'.

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 100% with detailed parameter descriptions. The tool description adds context by explaining forwarding of specific flags and the slower startup reason in waitTimeoutMs. While helpful, it does not significantly enhance meaning beyond the schema, so baseline 3 is appropriate.

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 clearly states the tool spawns an Electron app via npm script, specifies typical script ('start') and project type (electron-forge). It distinguishes from siblings by noting this is for forge workspaces where dev server must come up first. Purpose is highly specific and unambiguous.

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

Usage Guidelines4/5

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

The description explicitly says 'Use this for an electron-forge workspace...' indicating when to use this tool. It mentions cwd must contain package.json and that forge rebuilds renderer, guiding usage. However, it does not explicitly state when NOT to use it (e.g., for direct binary launch).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/iamvinitk/electron-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server