execute_script
Executes custom JavaScript in the browser context, accepting arguments and returning the result to enable dynamic page manipulation and data extraction.
Instructions
Execute arbitrary JavaScript code in the browser page context and return the result.
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_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | Arguments to pass to script (accessible via arguments[0], arguments[1], etc.) | |
| script | Yes | JavaScript code to execute in browser context. Use "return" to return values. |