execute_js
Execute JavaScript code or send CDP commands directly within browser pages to automate interactions, manipulate content, and control browser behavior programmatically.
Instructions
Execute arbitrary JS in the current page context or send JSON CDP bridge commands through the page bridge.
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": "execute_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | ||
| session_id | No | ||
| no_monitor | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||