pmux_browser_eval
Evaluate a JavaScript expression in a browser tab and get the result with tab ID. A timeout or JS exception returns HTTP 409.
Instructions
Evaluate a JavaScript expression in the page and return { tabId, value } (CDP Runtime.evaluate, returnByValue + awaitPromise, 10s timeout). A JS exception/timeout surfaces as 409. Electron-only: 503 = not under Electron (hard); 409 'Browser tab not attached yet' = webview not dom-ready (transient, retry shortly).
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": {
"workspaceId": "<workspaceId>",
"tabId": "<tabId>",
"expression": "<expression>"
},
"name": "pmux_browser_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tabId | Yes | Target tab id (from pmux_list_tabs / pmux_create_tab). | |
| expression | Yes | JavaScript expression evaluated in the page (CDP, 10s timeout). | |
| workspaceId | Yes | Target workspace id (from pmux_list_workspaces). |