Skip to main content
Glama

cwsi.net Fare Classes & Mileage Calculators

ANA Mileage Club Miles and Premium Points Calculator

calculate_ana_miles
Read-onlyIdempotent

Estimate the ANA Mileage Club miles and Premium Points for flights operated by the ANA Group. Miles = distance x booking-class rate (F/A/J 150%, C/D/Z 125%, G/E/Y/B/M 100%, P/N/U/H/Q 70%, V/W/S/T 50%, L/K 30%, O/I/R/X 0). Premium Points = distance x the same rate x route ratio (Japan domestic x2; Japan to Asia, Oceania or Vladivostok x1.5; else x1) + 400 boarding points in F A J C D Z P G E N Y B M (none on Japan domestic legs). Give segs: one entry per one-way flight with its great-circle miles (calculate_flight_distance gives them), the ISO country codes of its two airports, and from/to IATA airport codes (set from or to to VVO for Vladivostok, which shares RU with the rest of Russia). Takes no price. Uses cwsi.net's calculator and the airline's published rules. Unofficial.

Input Schema

NameRequiredDescriptionDefault
ppNoPremium Points you have this year (optional). Used only for the progress toward the next tier.
clsNoBooking class. FA = F, A (First 150%); J = J (Business 150%); CDZ = C, D, Z (Business 125%); P = P (Business 70%); GE = G, E (Premium Economy 100%); N = N (Premium Economy 70%); YBM = Y, B, M (Economy 100%); UHQ = U, H, Q (Economy 70%); VWST = V, W, S, T (Economy 50%); LK = L, K (Economy 30%); ORIX = O, R, I, X (Not eligible). The letter on your ticket. ANA earns by booking class, not by fare brand name.YBM
ppgNoOf those, Premium Points on ANA Group flights (optional). Each tier needs half its Premium Points on ANA Group flights. The flights here are ANA Group flights.
cardNoANA Gold Card or ANA Card Premium?. N = No; G = Yes. Holders reach Bronze at 30,000 Premium Points without the 15,000 on ANA Group flights.N
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 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.ow
statusNoYour ANA status. NO = None; BR = Bronze; PL = Platinum; DI = Diamond.NO
creditToNoCredit the flights to a partner program instead of ANA'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); 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 booking class is cls (or creditClass). The flights are segs (their miles), or creditFlights.
creditClassNoThe booking class letter for creditTo, when it differs from the class question. 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. Changed4 schema fields changed
    • addedInput schema / properties / creditClass
      Added value: +{
      +  "description": "The booking class letter for creditTo, when it differs from the class question. 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 ANA'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); 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 booking class is cls (or creditClass). The flights are segs (their miles), or creditFlights.",
      +  "enum": [
      +    "united",
      +    "aeroplan",
      +    "flying-club"
      +  ],
      +  "type": "string"
      +}
  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 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 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 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 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. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly/idempotent/non-destructive/closed-world), but the description adds genuinely new behavioral context: the underlying data source ('cwsi.net's calculator and the airline's published rules'), an authoritative caveat ('Unofficial'), and an input-coverage statement ('Takes no price'). It does not discuss precision, rounding, or rule-version staleness, so it is not exhaustive.

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

Conciseness3/5

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

The purpose is front-loaded in sentence one, and nothing is pure filler, but the rest is a single dense paragraph that interleaves the earning-rate table, the Premium Points formula, input format instructions, and sourcing caveats. Substantial portions (the class-rate enumeration, the segs field guidance) restate what the schema already carries, so the text is longer than it needs to be.

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?

For an 11-parameter tool with a nested segs array and an output schema, the description covers the core path end to end: what it computes, the formula, the required per-segment shape, the dependency on calculate_flight_distance, and the data source/disclaimer. Return values are covered by the output schema, so their absence here is not a gap.

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 the baseline is 3; the description earns above that by explaining how the parameters interact (miles = distance x booking-class rate; Premium Points adds route ratio and 400 boarding points) and by adding an actionable rule not spelled out in the schema ('set from or to to VVO for Vladivostok, which shares RU with the rest of Russia'). It still says nothing about the creditTo/creditClass/creditStatus/creditFlights family, leaving a quarter of the parameters purely schema-defined.

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 and resource ('Estimate the ANA Mileage Club miles and Premium Points') and bounds the scope to 'flights operated by the ANA Group', which an agent can distinguish at a glance from the ~50 sibling airline calculators. It goes further by naming the exact formulas used, so the agent knows what output to expect.

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 clear input guidance ('Give segs: one entry per one-way flight...') and routes the agent to the sibling that produces the needed miles value ('calculate_flight_distance gives them'), plus the unusual VVO-for-Vladivostok instruction. It never states an explicit when-not or names a competing tool, so it stops short of a 5.

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