Evaluate JavaScript
dev_browser_evaluateRun JavaScript code directly within a web page to interact with the DOM, extract data, or trigger page actions. Execute arbitrary browser-side expressions or statements.
Instructions
Evaluate JavaScript in the page. Pass a browser-side expression or statements.
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": {
"code": "<code>"
},
"name": "dev_browser_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript to eval in the page context. | |
| browser | No | Named daemon-managed browser instance. Default: DEV_BROWSER_BROWSER or 'default'. | |
| connect | No | Attach to a running Chrome instance. true/auto-discover, or a CDP URL like http://localhost:9222. | |
| headless | No | Launch daemon Chromium without a window. | |
| pageName | No | Named page to reuse across calls. Default: "main". | |
| timeoutSeconds | No | Script execution timeout in seconds. Default: 30. | |
| ignoreHttpsErrors | No | Ignore HTTPS certificate errors for daemon-launched Chromium. |