browser_exec_js
Run JavaScript on a target tab (same CDP evaluate path as BrowserGPT Quick Task exec_js). Requires tab_id from browser_tabs. Returns ok, value, logs, metrics.
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": {
"tab_id": "<tab_id>",
"javascript": "<javascript>"
},
"name": "browser_exec_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab_id | Yes | browser_tabs targetId | |
| javascript | Yes | JavaScript source to evaluate | |
| timeout_ms | No | Default 15000, max 120000 | |
| notification_message | No | Short user-facing sentence for this action if the follow-up reply fails. Plain text only; do not mention template syntax or variable names. |