execute_js
Run JavaScript in the current page and get the returned value. Redacts secrets unless disabled; requires confirmation to prevent unsafe execution.
Instructions
Run JavaScript in the page and return its result. Use return for a value; secrets in output are redacted unless redact=false. DANGER: requires confirm=true
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": "execute_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| redact | No | ||
| tab_id | No | ||
| confirm | No |