Skip to main content
Glama

cwsi.net Fare Classes & Mileage Calculators

Air France-KLM Flying Blue Miles and XP Calculator

calculate_flying_blue_miles
Read-onlyIdempotent

Estimate the Flying Blue Miles and XP an Air France or KLM ticket earns (set airline to KL for KLM). Miles = fare in EUR (base fare plus carrier surcharge, no taxes) x rate by level (Explorer 4, Silver 6, Gold 7, Platinum 8, Ultimate 9). XP per flight by cabin and distance band (Domestic = both airports in one country; Medium under 2,000 miles; Long 1 to 3,500; Long 2 to 5,000; Long 3 above). 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. Uses cwsi.net's calculator and the airline's published rules. Give the price in EUR, not US dollars. Unofficial.

Input Schema

NameRequiredDescriptionDefault
xpNoXP you have so far (optional). Used only for the progress toward the next level.
segsYesThe 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 cabin (E, P, B, F) for a flight in another cabin than the ticket's; 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).
tripNoTrip. ow = One way; rt = Round trip. Round trip counts the same flights back the other way for XP. The fare above is for the whole ticket either way.ow
cabinNoCabin. E = Economy; P = Premium; B = Business; F = La Première (Air France). XP depend on the cabin and the distance band, not the booking class. La Première is Air France only.E
levelNoYour Flying Blue level. EX = Explorer (4 per euro); SV = Silver (6 per euro); GD = Gold (7 per euro); PL = Platinum (8 per euro); UL = Ultimate (9 per euro).EX
priceNoTicket fare in euros (whole trip) in EUR. The base fare plus the carrier-imposed surcharge, without government taxes and airport charges, for the whole ticket. Enter it in euros; Flying Blue converts other currencies itself. Required unless creditTo is given.
airlineNoAirline. AF = Air France; KL = KLM.AF
creditToNoCredit the flights to a partner program instead of Air France's own: delta = Delta SkyMiles (creditStatus one of: SkyMiles Member, Silver Medallion, Gold Medallion, Platinum Medallion, Diamond Medallion); flying-club = Flying Club (creditStatus one of: Red, Silver, Gold). 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. The programs follow the airline in airline (AF: delta, flying-club; KL: delta, flying-club). Give the booking class letter as creditClass. The flights are segs (their miles), or creditFlights. No price is needed with creditTo.
creditClassNoThe booking class letter on the ticket, for creditTo (required with creditTo). Ignored without creditTo.
creditStatusNoYour status in the creditTo program, by its name as listed under creditTo. Defaults to the base level. Ignored without creditTo.
creditFlightsNoThe 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

NameRequiredDescriptionDefault
linkYes
notesYes
inputsYes
airlineYes
headlineYes
progressNo
breakdownYes
calculatorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / creditClass
      Added value: +{
      +  "description": "The booking class letter on the ticket, for creditTo (required with creditTo). Ignored without creditTo.",
      +  "pattern": "^[A-Za-z]$",
      +  "type": "string"
      +}
    • addedInput schema / properties / creditFlights
      Added value: +{
      +  "description": "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.",
      +  "items": {
      +    "properties": {
      +      "from": {
      +        "description": "The departure airport's code; labels the breakdown.",
      +        "pattern": "^[A-Za-z0-9]{3,4}$",
      +        "type": "string"
      +      },
      +      "miles": {
      +        "description": "Great-circle distance of this flight in miles.",
      +        "maximum": 12500,
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "to": {
      +        "description": "The arrival airport's code; labels the breakdown.",
      +        "pattern": "^[A-Za-z0-9]{3,4}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "miles"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 8,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / creditStatus
      Added value: +{
      +  "description": "Your status in the creditTo program, by its name as listed under creditTo. Defaults to the base level. Ignored without creditTo.",
      +  "maxLength": 64,
      +  "type": "string"
      +}
    • addedInput schema / properties / creditTo
      Added value: +{
      +  "description": "Credit the flights to a partner program instead of Air France's own: delta = Delta SkyMiles (creditStatus one of: SkyMiles Member, Silver Medallion, Gold Medallion, Platinum Medallion, Diamond Medallion); flying-club = Flying Club (creditStatus one of: Red, Silver, Gold). 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. The programs follow the airline in airline (AF: delta, flying-club; KL: delta, flying-club). Give the booking class letter as creditClass. The flights are segs (their miles), or creditFlights. No price is needed with creditTo.",
      +  "enum": [
      +    "delta",
      +    "flying-club"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / price / description
      Previous value: -"Ticket fare in euros (whole trip) in EUR. The base fare plus the carrier-imposed surcharge, without government taxes and airport charges, for the whole ticket. Enter it in euros; Flying Blue converts other currencies itself."New value: +"Ticket fare in euros (whole trip) in EUR. The base fare plus the carrier-imposed surcharge, without government taxes and airport charges, for the whole ticket. Enter it in euros; Flying Blue converts other currencies itself. Required unless creditTo is given."
    • changedInput schema / required
      Previous value: -[
      -  "price",
      -  "segs"
      -]New value: +[
      +  "segs"
      +]
  2. Changed3 schema fields changed
    • changedInput schema / properties / segs / description
      Previous value: -"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 cabin (E, P, B, F) for a flight in another cabin than the ticket's; 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)."New value: +"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 cabin (E, P, B, F) for a flight in another cabin than the ticket's; 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)."
    • changedInput schema / properties / segs / items / properties / from / description
      Previous value: -"The departure airport's IATA code, e.g. SYD. Labels the breakdown; JAL and ANA use it to spot Vladivostok (VVO), Qantas to pick its route tables, and Iberia to spot the Madrid-Barcelona Air Shuttle (MAD, BCN)."New value: +"The departure airport's IATA code, e.g. SYD. Labels the breakdown; JAL and ANA use it to spot Vladivostok (VVO), Qantas to pick its route tables, Iberia to spot the Madrid-Barcelona Air Shuttle (MAD, BCN), and SAS to pick its long-haul tables (named by city)."
    • changedInput schema / properties / segs / items / properties / to / description
      Previous value: -"The arrival airport's IATA code, e.g. SYD. Labels the breakdown; JAL and ANA use it to spot Vladivostok (VVO), Qantas to pick its route tables, and Iberia to spot the Madrid-Barcelona Air Shuttle (MAD, BCN)."New value: +"The arrival airport's IATA code, e.g. SYD. Labels the breakdown; JAL and ANA use it to spot Vladivostok (VVO), Qantas to pick its route tables, Iberia to spot the Madrid-Barcelona Air Shuttle (MAD, BCN), and SAS to pick its long-haul tables (named by city)."
  3. Changed3 schema fields changed
    • changedInput schema / properties / segs / description
      Previous value: -"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 cabin (E, P, B, F) for a flight in another cabin than the ticket's; 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)."New value: +"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 cabin (E, P, B, F) for a flight in another cabin than the ticket's; 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)."
    • changedInput schema / properties / segs / items / properties / from / description
      Previous value: -"The departure airport's IATA code, e.g. SYD. Labels the breakdown; JAL and ANA use it to spot Vladivostok (VVO), and Qantas to pick its route tables."New value: +"The departure airport's IATA code, e.g. SYD. Labels the breakdown; JAL and ANA use it to spot Vladivostok (VVO), Qantas to pick its route tables, and Iberia to spot the Madrid-Barcelona Air Shuttle (MAD, BCN)."
    • changedInput schema / properties / segs / items / properties / to / description
      Previous value: -"The arrival airport's IATA code, e.g. SYD. Labels the breakdown; JAL and ANA use it to spot Vladivostok (VVO), and Qantas to pick its route tables."New value: +"The arrival airport's IATA code, e.g. SYD. Labels the breakdown; JAL and ANA use it to spot Vladivostok (VVO), Qantas to pick its route tables, and Iberia to spot the Madrid-Barcelona Air Shuttle (MAD, BCN)."
  4. Changed3 schema fields changed
    • changedInput schema / properties / segs / description
      Previous value: -"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 cabin (E, P, B, F) for a flight in another cabin than the ticket's; optional from and to airport codes, used only to label the breakdown."New value: +"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 cabin (E, P, B, F) for a flight in another cabin than the ticket's; 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)."
    • changedInput schema / properties / segs / items / properties / from / description
      Previous value: -"The departure airport code (labels the breakdown only)."New value: +"The departure airport's IATA code, e.g. SYD. Labels the breakdown; JAL and ANA use it to spot Vladivostok (VVO), and Qantas to pick its route tables."
    • changedInput schema / properties / segs / items / properties / to / description
      Previous value: -"The arrival airport code (labels the breakdown only)."New value: +"The arrival airport's IATA code, e.g. SYD. Labels the breakdown; JAL and ANA use it to spot Vladivostok (VVO), and Qantas to pick its route tables."
  5. Added

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare a safe, idempotent, closed-world read, so the description earns credit for what it adds: the earning formula, that it relies on cwsi.net's calculator and the airline's published rules, and the honest 'Unofficial' caveat. It does not, however, describe rate limits, accuracy caveats beyond 'unofficial', or pagination-type traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded and the dense paragraph keeps formula, band definitions, and input requirements together with little redundancy. It is long and somewhat wall-of-text, but each clause carries operative content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 11 parameters, nested segs, and an output schema present, the description still covers inputs, units, ordering, the creditTo alternative flow, and the unofficial-service caveat. Nothing an agent needs to invoke it correctly appears missing, and return values are properly delegated to the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3, but the description adds genuine meaning beyond the schema: the level-to-rate mapping (Explorer 4 ... Ultimate 9), that miles derive from base fare plus carrier surcharge excluding taxes, and the distance-band definitions. These clarify how price, level, and segs interrelate rather than merely restating fields.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Estimate) and resource (Flying Blue Miles and XP) scoped to Air France or KLM tickets, immediately telling an agent which of the many sibling airline calculators to use. It even disambiguates the AF/KL dual-branding with 'set airline to KL for KLM'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete preconditions and unit guidance (price in EUR not USD, miles via calculate_flight_distance, one seg per one-way flight in order) and explains when the creditTo partner path applies. It routes to a sibling for distances but never explicitly frames when *not* to use this tool versus another airline's calculator.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources