Inject into running Electron app
electron_injectAttach to a running Electron app without a debug flag by injecting the Node inspector using its process ID, enabling inspection and automation of the live desktop app.
Instructions
Attach to a running Electron process that was NOT started with a debug flag, by injecting the Node inspector. Provide pid. Returns: { ok, session_id, transport, windows, capabilities }. Errors: INJECT_FAILED (handshake failed or inspector belongs to another process; retryable — try electron_attach when the app already exposes a debug endpoint), TRANSPORT_UNSUPPORTED, BAD_ARGUMENT.
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": {
"pid": "<pid>"
},
"name": "electron_inject"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes | Process id of the running Electron app. | |
| timeoutMs | No | Max wait for the inspector handshake. |