browser_evaluate
Run JavaScript expressions in the active web page to extract DOM data. Restricted to safe read-only operations for secure evaluation.
Instructions
Execute JavaScript in the current page context and return the result. Restricted to safe DOM read operations — eval, Function, fetch, WebSocket, and document.write are blocked.
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": {
"script": "<script>"
},
"name": "browser_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | JavaScript expression to evaluate (must not use eval, Function, import, fetch, WebSocket, or document.write) |