firefox_eval
Runs a JavaScript expression in a Firefox page and returns the JSON result as a fallback when other browser-control tools are insufficient.
Instructions
Run a JavaScript expression in the page and return the JSON result. Fallback when other tools are not enough.
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": "firefox_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| js | Yes | Expression or IIFE, e.g. "document.title" or "(() => [...document.links].length)()" | |
| tabId | No | Tab id from firefox_tabs. Default: the tab last used, else the visible one. |