eval
Execute a JavaScript expression in the current browser page to inspect or modify the DOM; use query for data extraction because strict CSP may block it.
Instructions
Run a JS expression in the page. NOTE: fails on any site with a strict CSP (no unsafe-eval) — most large sites. Prefer query for data extraction. Isolated world: sees the DOM, not the page's own JS variables.
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": {
"expr": "<expr>"
},
"name": "eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expr | Yes | ||
| tabId | No | Target tab id. Omit to use the active controlled tab. | |
| spaceId | No | Pin this command to an owned BeatBrowser TaskSpace. Also pass its tabId. |