javascript
Execute page-level scripts in Firefox tabs and return the final expression as JSON; wrap asynchronous logic in an IIFE.
Instructions
Run JavaScript in the page and return the last expression value (JSON). For async code use (async () => { ... })().
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": {
"code": "<code>"
},
"name": "javascript"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| tabId | No | Tab to act on. Omit for the active tab. |