browser_evaluate
Execute JavaScript expressions in a browser page and retrieve the JSON-serialized result for data extraction.
Instructions
Run a JavaScript EXPRESSION in the page and return its JSON-serialized result (e.g. document.title or [...document.links].length). Not a statement body.
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": {
"js": "<js>"
},
"name": "browser_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| js | Yes | A JS expression to evaluate in the page |