frame_evaluate
Run JavaScript inside a same-origin iframe by specifying its URL pattern. Useful for automating actions within specific frames while avoiding cross-origin restrictions.
Instructions
Run JS inside an iframe matching URL pattern.
Same-origin frames only: cross-origin iframes (reCAPTCHA bframe, payment
widgets, third-party embeds) block contentWindow.eval and return an error.
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": {
"frame_url_pattern": "<frame_url_pattern>",
"expression": "<expression>"
},
"name": "frame_evaluate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frame_url_pattern | Yes | ||
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |