evaluate
Run JavaScript in the active Edge tab's page context and return a JSON-serializable result; supports await and DOM globals for inspecting or extracting page data.
Instructions
Run a JavaScript expression in the active tab's page context and return the result as JSON. The expression is evaluated as the body of an async function, so you can use await. DOM globals (document, window) are available. Results must be JSON-serializable.
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 | JavaScript to evaluate, e.g. document.title or (() => document.querySelectorAll('a').length)() |