Skip to main content
Glama

cwsi.net Fare Classes & Mileage Calculators

China Eastern Eastern Miles Calculator

calculate_china_eastern_miles
Read-onlyIdempotent

China Eastern Eastern Miles for a China Eastern, Shanghai Airlines or China United ticket, from the fare plus the YQ fuel surcharge in yuan (CNY, whole ticket). Miles = fare x a coefficient by member level and sales channel (China Eastern app, website or 95530 / other channels: 1-star 0.264 / 0.24 up to Platinum 1.232 / 1.12), rounded down, no minimum. China Eastern does not say how a ticket in another currency is converted, so give the CNY amount. Progress toward the next level by yearly spend (2-star 3,000 up to Platinum 100,000 yuan; each level also needs qualifying segments or kilometres, named in the note); spend is the qualifying spend so far. Uses cwsi.net's calculator and the airline's published rules. Give the price in CNY, not US dollars. Unofficial.

Input Schema

NameRequiredDescriptionDefault
levelNoYour Eastern Miles level when you fly. S1 = 1-star member (coefficient 0.264 or 0.24); S2 = 2-star member (0.44 or 0.4); S3 = 3-star member (0.66 or 0.6); S4 = 4-star member (0.792 or 0.72); S5 = 5-star member (0.88 or 0.8); S6 = 6-star member (0.968 or 0.88); SV = Silver card (SkyTeam Elite, 1.056 or 0.96); GD = Gold card (SkyTeam Elite Plus, 1.144 or 1.04); PT = Platinum card (SkyTeam Elite Plus, 1.232 or 1.12).S1
priceNoFare plus YQ (CNY, whole ticket) in CNY. In yuan: the ticket price including the YQ fuel surcharge, for the whole ticket. China Eastern does not say how a ticket in another currency is converted. Required unless creditTo is given.
spendNoQualifying spend so far in the 12 months (CNY, optional). Used only for the progress toward the next level.
channelNoWhere the ticket was sold. OWN = China Eastern app, website or 95530 (higher coefficient); OTH = Any other channel (travel agents and other sellers). China Eastern pays a higher coefficient on its own channels.OWN
creditToNoCredit the flights to a partner program instead of China Eastern'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. Give the booking class letter as creditClass. Give the flights as creditFlights (one entry per flight with its great-circle miles). 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 China Eastern'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. Give the booking class letter as creditClass. Give the flights as creditFlights (one entry per flight with its great-circle miles). No price is needed with creditTo.",
      +  "enum": [
      +    "delta",
      +    "flying-club",
      +    "flying-blue"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / price / description
      Previous value: -"Fare plus YQ (CNY, whole ticket) in CNY. In yuan: the ticket price including the YQ fuel surcharge, for the whole ticket. China Eastern does not say how a ticket in another currency is converted."New value: +"Fare plus YQ (CNY, whole ticket) in CNY. In yuan: the ticket price including the YQ fuel surcharge, for the whole ticket. China Eastern does not say how a ticket in another currency is converted. Required unless creditTo is given."
    • removedInput schema / required
      Removed value: -[
      -  "price"
      -]
  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 read-only, idempotent, non-destructive, closed-world profile, and the description adds real context beyond them: the result is rounded down with no minimum, progress is driven by yearly spend plus qualifying segments/km, and the tool is explicitly "Unofficial" and built on cwsi.net's calculator. It omits return shape, but an output schema exists.

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 and currency caveat are front-loaded, but the body is a single dense paragraph embedding two coefficient tables and level thresholds in prose, which is hard to parse. Information is relevant but not efficiently structured.

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 branching tool with eight parameters and an output schema (so return values need no explanation), the description covers both the own-program formula and the creditTo partner path, including the creditClass/creditFlights requirements. Minor gaps remain around the creditTo earning mechanics, but overall it is sufficient to call the tool correctly.

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% and the enum values already document the coefficient tables and channel/level meanings. The description largely restates those coefficients (1-star 0.264/0.24 up to Platinum 1.232/1.12) rather than adding new semantic detail, so the baseline 3 applies.

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 (calculate), resource (Eastern Miles), and precise scope (China Eastern, Shanghai Airlines or China United tickets, from fare plus YQ). Against a large sibling set of airline calculators, the airline scope and the exact earning formula make it unambiguous which tool applies.

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?

Explains when to use the own-program path versus the creditTo partner path ("leave creditTo out for the airline's own program"), and repeatedly instructs to supply CNY rather than another currency. No explicit when-not or pointer to sibling calculators, so it stops short of full routing guidance.

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