browser_eval
Execute JavaScript in the current page to inspect the DOM, read texts, count elements, or try selectors, and get the result.
Instructions
Executes arbitrary JavaScript in the current page and returns the value (useful to inspect the DOM, read texts, count elements, try selectors).
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_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | JS expression (evaluated with the returned result) |