browser_evaluate
Execute JavaScript code in the browser page to extract data or modify content. Returns JSON-serializable results.
Instructions
Execute JavaScript code in the browser page. The code runs in the page context. Return a JSON-serializable value.
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 code to execute. Use arrow function for expressions: () => document.title |