TAP Air Portugal Miles&Go Calculator
calculate_tap_air_portugal_milesTAP Air Portugal Miles&Go Bonus Miles for TAP flights. Bonus Miles = distance x fare % by zone, rounded down per flight, no minimum: Europe and North Africa (both airports in Europe, including Madeira, the Azores, the Canary Islands, Turkiye and Cyprus, or Morocco, Algeria, Tunisia, Libya and Egypt) Discount 20, Classic 70, Plus 100, Executive 175, Top Executive 200; Intercontinental Discount 20, Basic 50, Classic 100, Plus and Prime 150, Top Prime and Executive 175, Top Executive 200; a codeshare flown by TAP (CS) 40 or 50. The Silver and Gold status bonus is shown as a note, not added. Progress toward Silver, Gold and Navigator by TAP flights (25 / 50 / 70); fl and sm are the flights and Status Miles so far. Give segs: one entry per one-way flight, in order, with its great-circle miles (calculate_flight_distance gives them) and the ISO country codes of its two airports (they pick the zone). Takes no price. Uses cwsi.net's calculator and the airline's published rules. Unofficial.
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": {
"segs": "<segs>"
},
"name": "calculate_tap_air_portugal_miles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fl | No | TAP flights you have flown in your annual period (optional). Silver, Gold and Navigator can be reached with 25, 50 or 70 TAP flights. | |
| sm | No | Status Miles you have in your annual period (optional). Shown beside the Status Mile thresholds; this flight's Status Miles are not added. | |
| fare | No | Fare. DI = Discount (Economy, Europe 20%, intercontinental 20%); BA = Basic (Economy, intercontinental only 50%); CL = Classic (Economy, Europe 70%, intercontinental 100%); PL = Plus (Economy, Europe 100%, intercontinental 150%); PR = Prime (Economy Prime, intercontinental only 150%); TP = Top Prime (Economy Prime, intercontinental only 175%); EX = Executive (Business, Europe 175%, intercontinental 175%); TE = Top Executive (Business, Europe 200%, intercontinental 200%); CS = Codeshare flown by TAP (sold by a partner, flown by TAP: 40% in Europe, 50% intercontinental). The fare name on your booking. TAP earns by fare name, not booking class letter. Basic, Prime and Top Prime are sold only on intercontinental flights. | CL |
| segs | Yes | The flights, one way and in order, one entry per flight (1 to 8): fromCountry and toCountry, the ISO 3166 two-letter country codes of its two airports; miles, its great-circle distance in miles (1 to 12,500); optional from and to, the IATA codes of its two airports, which label the breakdown; some airlines also use them (Vladivostok, VVO, on JAL and ANA; the Madrid-Barcelona Air Shuttle, MAD-BCN, on Iberia; the long-haul tables named by city on SAS). | |
| trip | No | Trip. ow = One way; rt = Round trip. Round trip counts the same flights back the other way. | ow |
| status | No | Your TAP Miles&Go status. BS = TAP Miles&Go; SI = Silver; GO = Gold; NA = Navigator. Silver earns 25% and Gold and Navigator 50% extra miles on TAP flights. That bonus is shown as a note, not added to the total. | BS |
| creditTo | No | Credit the flights to a partner program instead of TAP Air Portugal's own: united = United MileagePlus (creditStatus one of: General member, Premier Silver, Premier Gold, Premier Platinum, Premier 1K); aeroplan = Aeroplan (creditStatus one of: Aeroplan Member, 25K, 35K, 50K, 75K, Super Elite). Earns by each flight's distance and the booking class at the program's published partner rates; leave creditTo out for the airline's own program. Give the booking class letter as creditClass. The flights are segs (their miles), or creditFlights. | |
| creditClass | No | The booking class letter on the ticket, for creditTo (required with creditTo). Ignored without creditTo. | |
| creditStatus | No | Your status in the creditTo program, by its name as listed under creditTo. Defaults to the base level. Ignored without creditTo. | |
| creditFlights | No | The flights for creditTo: one entry per one-way flight, in order, with its great-circle miles (calculate_flight_distance gives them) and optionally from/to airport codes. Defaults to segs when they carry miles. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| link | Yes | ||
| notes | Yes | ||
| inputs | Yes | ||
| airline | Yes | ||
| headline | Yes | ||
| progress | No | ||
| breakdown | Yes | ||
| calculator | Yes |