browser_evaluate
Execute JavaScript in a real browser to query DOM elements, read page state, or perform custom operations within existing sessions.
Instructions
Execute JavaScript in the page and return the result. Use for DOM queries, reading page state, or any operation not covered by other tools.
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": {
"expression": "<expression>"
},
"name": "browser_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | JavaScript expression or code to evaluate in the page context |