browser_js
Runs JavaScript in a browser tab or iframe context to inspect or manipulate the DOM. Choose an isolated world for safe DOM access or the page context to reach the page's own JS globals.
Instructions
Evaluate JavaScript in the tab (or an iframe target_id). world "isolated" (default) shares the DOM
but not the page's JS globals and is invisible to the page; "page" runs in the page's own context. tab: the handle browser_new_tab returned ("t3"). Pass it on every call: several agents can share this server, and the tab is how each one keeps to its own page.
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": {
"expression": "<expression>"
},
"name": "browser_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | ||
| world | No | isolated | |
| target_id | No | ||
| expression | Yes |