Add a train booking
add_train_journeyAdds a UK train booking to the person’s Untap account and works out Delay Repay for it. One booking per call, with each journey in legs (one for a single, two for a return, in travel order). Untap checks National Rail’s Historical Service Performance records for each journey; the delay, actual arrival and cancellation fields are optional, and when left out Untap looks them up. Operators accept one journey per claim form, so a return with both directions late means two claims. A train journey that is already saved is returned as it is, not saved twice. Requires sign-in to Untap.
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": {
"ticket_price_pence": "<ticket_price_pence>",
"ticket_type": "<ticket_type>",
"booking_reference": "<booking_reference>",
"legs": "<legs>"
},
"name": "add_train_journey"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| legs | Yes | Each journey on this booking, in travel order: one for a single, two for a return (outward first), more for a multi-stop booking. Untap works out Delay Repay for each journey and adds them up. | |
| season_type | No | Season tickets only: how long the season runs. The operator divides the season price into single journeys (for example annual 464, monthly 40, weekly 10, flexi 16) and pays a share of one journey. When left out, the result gives the percentage and the method but no amount. | |
| ticket_type | Yes | Ticket type as printed. For "return" and "open_return" the single fare is half the price paid; for "season" the amount is a share of one journey value (see season_type); every other type uses the full price as the single fare. | |
| booking_reference | Yes | Booking reference if available, otherwise null. | |
| ticket_price_pence | Yes | Total fare paid in pence for the whole booking. £62.00 = 6200. |