Search trains
mb_search_trainsSearch train options between two stations on a specific date, listing each class, adult price, and available seats for comparison.
Instructions
Trains between two stations on a date with every class (wagon), its price per adult and free seats.
price_toman is per adult; for children, infants or a compartment call mb_train_price with the class_id. Top-level refund_penalties apply to every class unless it lists its own. Stops: mb_train_stops. No seats: mb_train_price_calendar or mb_alternative_routes. A round trip is two calls (return leg with outbound_class_id).
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": {
"origin": "<origin>",
"destination": "<destination>",
"date": "<date>"
},
"name": "mb_search_trains"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Travel date YYYY-MM-DD (sales open about 18 days ahead). | |
| sort | No | Order of the trains. | earliest |
| limit | No | Max trains. | |
| quota | No | Seat quota: general (mixed), men, women, or car transport. | general |
| origin | Yes | Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran). | |
| destination | Yes | Train station id from mb_find_place(mode='train'), e.g. 1 (Tehran). | |
| available_only | No | Hide sold-out classes and trains with no free seat. | |
| outbound_class_id | No | Return leg of a round trip only: the outbound class_id (limits the return to the same rail company). |