Evaluate JavaScript
browser_evaluateExecute custom JavaScript in the active page context and return JSON-serializable values for debugging, scraping, or automation.
Instructions
Evaluate arbitrary JavaScript code in the context of the current page and return the result (JSON-serializable values only).
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": "browser_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The JavaScript code to evaluate in the page context |