Skip to main content
Glama

cwsi.net Fare Classes & Mileage Calculators

Xiamen Airlines Egret Miles Calculator

calculate_xiamen_airlines_miles
Read-onlyIdempotent

Xiamen Airlines Egret Miles for a Xiamen Airlines, Hebei Airlines or Jiangxi Airlines flight ticketed on Xiamen stock (ticket numbers starting 731, 836 or 989), from the base fare plus fuel surcharge for that flight in yuan (CNY; other charges left out). Egret Miles = fare x (category multiplier + tier multiplier), rounded up, no minimum. Category (cat): 1.0 for First or Business (FB), Economy Y or W (YW) and Economy H on a China domestic route (HD); 0.7 for Economy H on an international, Hong Kong, Macao or Taiwan route (HI) and other Economy classes (EO). Tier: Egret Silver 0.2, Gold 0.3, Platinum 0.4, Diamond 0.5, none 0. Qualifying points for the flight are not calculated (the guide does not say whether its +1 counts per ticket or per segment); the tiers need 20, 40, 70 and 120 qualifying points in a calendar year. Give the CNY amount (Xiamen converts other currencies at the IATA rate on the issue date), one flight at a time. Uses cwsi.net's calculator and the airline's published rules. Give the price in CNY, not US dollars. Unofficial.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "calculate_xiamen_airlines_miles"
  }
}

Input Schema

NameRequiredDescriptionDefault
catNoCabin and booking class. FB = First or Business (category 1.0); YW = Economy Y or W (category 1.0); HD = Economy H, China domestic route (category 1.0); HI = Economy H, international, Hong Kong, Macao or Taiwan (category 0.7); EO = Other Economy classes (category 0.7). The category multiplier is 1.0 for First, Business and Economy Y, H, W and 0.7 for other Economy. H counts 1.0 on China domestic routes only.YW
tierNoYour Egret Miles tier when you fly. N = No tier (no bonus); SI = Egret Silver (+0.2); GO = Egret Gold (+0.3); PL = Egret Platinum (+0.4); DI = Egret Diamond (+0.5). The tier multiplier is added to the category multiplier.N
priceNoBase fare plus fuel surcharge (CNY, the flight) in CNY. In yuan: the base fare plus the fuel surcharge for the flight, without airport fees and other charges. For another currency, enter the equivalent in yuan. Required unless creditTo is given.
creditToNoCredit the flights to a partner program instead of Xiamen 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. 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. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare readOnlyHint, idempotentHint, etc., so the safety profile is covered. The description adds valuable context: the formula, rounding, no minimum, exclusions (qualifying points not calculated), currency conversion, and that it's unofficial. This goes well beyond annotations, though it doesn't discuss rate limits or error conditions.

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 description is long and dense, with multiple clauses packed into few sentences. It is front-loaded with the core purpose but contains tangential details (tier qualification thresholds, note about qualifying points) that may not be essential for invoking the tool. It could be more structured with clear separation of usage, parameters, and caveats.

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?

Given the complexity of the calculation, the description provides a complete picture: the formula, rounding rules, handling of different currencies, partner program alternatives, and even an unofficial disclaimer. With an output schema present, it doesn't need to explain return values, and annotations cover safety. It is fully sufficient for correct invocation.

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 schema already documents all parameters thoroughly. The description summarizes key parameter meanings (cat, tier, price, creditTo, etc.) but adds little beyond what the schema provides, except perhaps clarifying the formula's use of multipliers. Baseline 3 is appropriate.

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

Purpose4/5

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

The description clearly states what the tool does: calculate Xiamen Airlines Egret Miles for flights ticketed on Xiamen stock, based on fare and category/tier multipliers. It specifies the exact earning formula, which distinguishes it from generic mile calculators, but it does not explicitly differentiate itself from sibling tools like calculate_shenzhen_airlines_miles beyond the airline name.

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?

It implies when to use it: for Xiamen Airlines, Hebei Airlines, or Jiangxi Airlines flights ticketed on Xiamen stock, and mentions alternative creditTo programs (Delta, Flying Club, Flying Blue). It does not explicitly state when not to use it or compare with sibling calculators, which prevents 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