web_eval
Executes arbitrary JavaScript in a chosen browser tab and returns the result, enabling data extraction, DOM inspection, and custom page automation.
Instructions
Run arbitrary JavaScript in the page and return the result. The power tool; can be disabled with WEBAI_NO_EVAL.
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": "web_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target_id | No | Tab id from web_tabs. Omit to use the first/active tab. | |
| expression | Yes |