evaluate
Run a JavaScript expression in the page and return its result, with optional frame targeting for iframes.
Instructions
Evaluate a JavaScript expression in the page (top frame by default) and return its value. Use frame (e.g. f1) to target an iframe. Never trigger alert/confirm/prompt.
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": {
"tabId": "<tabId>",
"expression": "<expression>"
},
"name": "evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame | No | ||
| tabId | Yes | Tab id from tabs_context | |
| expression | Yes |