evaluate_js
Run JavaScript in a browser tab to inspect or manipulate page state; executes in an isolated world by default and can target page globals when needed.
Instructions
Evaluate JS in isolated world by default (alias: script=). Set main_world=True for page globals.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "evaluate_js"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tab | No | ||
| script | No | ||
| expression | No | ||
| main_world | No | ||
| max_length | No | ||
| timeout_ms | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |