evaluate_main
Executes JavaScript in the Electron main/node CDP target to debug or automate main-process behavior.
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 |