evaluate_main
Evaluates JavaScript in an Electron main or Node CDP target to inspect runtime state and debug main-process logic; use start_app with inspectMain:true for reliable target access.
Instructions
Evaluate JavaScript in the Electron main/node CDP target (use start_app with inspectMain:true for best results)
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_main"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targetId | No | Optional explicit main/node target id from list_targets | |
| processId | No | Process ID. If omitted, uses the single running app. | |
| expression | Yes | ||
| returnByValue | No |