Script for the next browser step
page_actionGenerates ready-made browser JavaScript for the next bus-booking step on redBus or MakeMyTrip, then indicates whether to read the page result or click the marked element.
Instructions
Get a ready-made browser script for the next booking step (redBus, MakeMyTrip).
Run the returned JavaScript in the user's open tab (your browser's run-JavaScript tool), then do what the reply says: usually call read_page with the result, or click the element it marked. Saves you writing page code. Never use it to type personal details or payment data.
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": "page_action"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site | No | redBus or MakeMyTrip (needed for every action but capture). | |
| seats | No | select_seats on redBus: seat numbers, e.g. ['3U']. | |
| action | Yes | capture: read the current page (then call read_page). open_bus: open one bus's seat map. select_seats: click seats. choose_points: pick boarding and drop points. decline_addons: say no to every paid extra. continue: the site's next-step button. | |
| boarding | No | choose_points: the boarding point's number from read_page, or its name. | |
| dropping | No | choose_points: the drop point's number from read_page, or its name. | |
| operator | No | open_bus: operator name as shown. | |
| departure | No | open_bus: departure time as shown, HH:MM. | |
| seat_indexes | No | select_seats on MakeMyTrip: the click numbers read_page listed for the chosen seats. |