browser_select_frame
Select an iframe by its index to run JavaScript within it. Find the correct index using browser_list_frames, then target actions precisely.
Instructions
Execute JavaScript in a specific iframe by frame index. Use browser_list_frames first to find the right index.
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_index": "<frame_index>"
},
"name": "browser_select_frame"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | JavaScript to execute in the frame (default: returns text content) | |
| frame_index | Yes | Frame index from browser_list_frames (0 = main frame) |