Skip to main content
Glama

cwsi.net Fare Classes & Mileage Calculators

China Airlines Dynasty Flyer Miles Calculator

calculate_china_airlines_miles
Read-onlyIdempotent

China Airlines Dynasty Flyer miles for China Airlines flights. Miles = distance x booking-class % (J 175; C 150; D, W, U 125; A 115; E, Y, B, M 100; K, V, T 80; R, Q, H, N 50; L, O, Z, X, G, S 0), rounded to the nearest mile per flight, no minimum. The Gold, Emerald and Paragon incentive (15/25/30%) is a note only. Status Points per flight are not calculated; the thresholds are Gold 360, Emerald 720 and Paragon 1,400 Status Points (sp: the Status Points you have, for the progress). 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. Takes no price. Uses cwsi.net's calculator and the airline's published rules. Unofficial.

Input Schema

NameRequiredDescriptionDefault
spNoStatus Points you have in the last 12 months (optional). Used only for the progress toward the next tier; the flight's own Status Points are not added.
clsNoBooking class. J = J (Business Flex, 175%); C = C (Business Standard, 150%); D = D (Business Basic, 125%); W = W (Premium Economy Flex, 125%); U = U (Premium Economy Flex, 125%); A = A (Premium Economy Standard, 115%); E = E (Premium Economy Basic, 100%); Y = Y (Economy Flex, 100%); B = B (Economy Flex, 100%); M = M (Economy Flex, 100%); K = K (Economy Standard, 80%); V = V (Economy Standard, 80%); T = T (Economy Standard, 80%); R = R (Economy Basic, 50%); Q = Q (Economy Basic, 50%); H = H (Economy Basic, 50%); N = N (Economy Basic, 50%); L = L (Economy Discount, 0%); O = O (No miles); Z = Z (No miles); X = X (No miles); G = G (No miles); S = S (No miles). The letter on your ticket. Classes O, Z, X, G and S, and L, earn no miles.Y
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 Dynasty Flyer tier. DY = Dynasty; GD = Gold; EM = Emerald; PG = Paragon. Gold, Emerald and Paragon members get incentive miles on top; the calculator shows them as a note.DY
creditToNoCredit the flights to a partner program instead of China Airlines'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); flying-blue = Flying Blue (creditStatus one of: Explorer, Silver, Gold, Platinum, Ultimate). 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 China Airlines'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); flying-blue = Flying Blue (creditStatus one of: Explorer, Silver, Gold, Platinum, Ultimate). 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": [
      +    "delta",
      +    "flying-club",
      +    "flying-blue"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4/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). Beyond them the description adds real behavioral detail: rounding to the nearest mile per flight with no minimum, that the 15/25/30% tier incentive is a note only, that Status Points per flight are not calculated, and that the source is cwsi.net plus published rules and is unofficial.

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 formula is front-loaded, which is good, but the body is a dense run-on of semicolon-joined clauses and it duplicates the class-percentage table that the schema already lists, which is wasted length.

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

Completeness4/5

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

For a complex 9-parameter tool this covers the earning rules, rounding, exclusions (no status points, no price) and source disclaimers well, and an output schema exists so return values need no explanation. The creditTo/partner-program branch is documented but terse relative to its complexity.

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

Parameters3/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 restates the booking-class percentages already fully enumerated in cls's schema and re-explains the segs shape, adding little semantics beyond what the structured fields carry.

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+resource ('China Airlines Dynasty Flyer miles for China Airlines flights') and scopes it to one airline, cleanly distinguishing it from the many sibling airline calculators. The earning formula is given up front, so an agent immediately knows what is being computed.

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?

The description clarifies the scope (China Airlines flights, no price taken) and routes to alternatives via 'calculate_flight_distance gives them' for segment miles and via creditTo for crediting to partner programs instead of Dynasty Flyer. It gives clear context but stops short of explicit when-not/exclusion statements.

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