iframe 操作
browser_frameAccess and interact inside cross-origin iframes that page snapshots cannot see. List frames, read text, extract elements with CSS selectors, evaluate JavaScript, or click, type and select within a specific frame.
Instructions
Operate inside any frame, including cross-origin iframes that browser_snapshot cannot see into (payment widgets, OAuth, embedded editors, third-party chat). action=list shows every frame with its id, URL and whether it is cross-origin. action=text reads that frame text, action=elements lists interactive elements with usable CSS selectors, action=evaluate runs an expression inside the frame, and action=click/type/select act on a CSS selector inside the frame. Always start with action=list.
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": {
"action": "<action>"
},
"name": "browser_frame"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | (type) text to enter | |
| index | No | (click) which match to click, 0-based (default 0) | |
| label | No | (select) option visible label | |
| limit | No | (elements) max elements to list (default 80) | |
| tabId | No | Tab id (default: active tab) | |
| value | No | (select) option value | |
| action | Yes | Frame operation | |
| frameId | No | Frame id from action=list, e.g. "f3" | |
| maxChars | No | (text) max characters to return (default 4000) | |
| selector | No | (click/type/select) CSS selector inside that frame | |
| expression | No | (evaluate) JavaScript expression evaluated inside the frame |