browser_execute_js
Execute JavaScript code inside a web page and retrieve the result as a JSON object or plain text string.
Instructions
Execute JavaScript and return the result as JSON (falls back to str for non-serialisable values).
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": {
"script": "<script>"
},
"name": "browser_execute_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | JavaScript to run in the page context |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |