evaluate
Run a JavaScript expression in the active tab and return the JSON result to read page data other tools do not expose.
Instructions
Run a JavaScript expression in the active tab and return the JSON result. For reading data the other tools do not expose.
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": "evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | Expression or async IIFE, e.g. document.querySelectorAll('li').length |