browser_evaluate
Execute JavaScript functions directly in the browser page context for fast custom interactions and data extraction.
Instructions
Execute arbitrary JavaScript code in the page context and return the result. Fast and direct.
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 | JavaScript function body to execute in the page context. |