Skip to main content
Glama

cwsi.net Fare Classes & Mileage Calculators

Thai Airways Royal Orchid Plus Miles Calculator

calculate_thai_airways_miles
Read-onlyIdempotent

Thai Airways Royal Orchid Plus miles and Qualifying Miles for THAI flights. Miles = distance x booking-class % (F 250; P 200; C, D 150; J, Z 125; A, U, Y, B, M 110; H, Q, T 100; K, S, V 75; G 50; W 25), rounded down, at least 500 miles a flight; L, O, I, X, E, N and R earn nothing. Qualifying Miles are the same without the 500-mile minimum. The Silver, Gold and Platinum tier bonus is a note only. Progress toward Silver (10,000) and Gold (50,000) Qualifying Miles in 12 months; sm is the Qualifying Miles so far. 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
smNoQualifying Miles you have in the last 12 months (optional). Used only for the progress toward Silver and Gold.
clsNoBooking class. F = F (Royal First 250%); P = P (Royal First 200%); C = C (Royal Silk 150%); D = D (Royal Silk 150%); J = J (Royal Silk 125%); Z = Z (Royal Silk 125%); A = A (Premium Economy 110%); U = U (Premium Economy 110%); Y = Y (Economy 110%); B = B (Economy 110%); M = M (Economy 110%); H = H (Economy 100%); Q = Q (Economy 100%); T = T (Economy 100%); K = K (Economy 75%); S = S (Economy 75%); V = V (Economy 75%); G = G (Economy 50%); W = W (Economy 25%); L = L (earns nothing); O = O (earns nothing); I = I (earns nothing); X = X (earns nothing); E = E (earns nothing); N = N (earns nothing); R = R (earns nothing). The letter on your ticket. Classes L, O, I, X, E, N and R earn no miles. Z is Royal Silk (and Premium Economy Plus); A is Premium Economy for flights on or after 1 July 2026.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 Royal Orchid Plus tier. RO = Member; SV = Silver; GD = Gold; PL = Platinum. Silver, Gold and Platinum get a 5%, 10% or 20% tier bonus on THAI international flights; it is explained below the result, not added. Your tier decides which tiers the progress bars show.RO
creditToNoCredit the flights to a partner program instead of Thai Airways'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). 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 Thai Airways'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). 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"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already mark this as a read-only, idempotent, non-destructive calculation, and the description still adds substantial behavior: the per-flight 500-mile floor, the rounding-down rule, the earn-nothing classes, that Qualifying Miles skip the minimum, and that the tier bonus is surfaced as a note rather than applied. It also discloses provenance and the 'Unofficial' caveat, which an agent should surface to a user.

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 leads, then formula, then input construction, then caveats — a sensible order with no filler sentences. It is dense and re-states the booking-class percentage table that the schema enum already carries, which is the main redundancy.

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 an output schema present, return values need not be described, and the description covers the remaining gaps: required segs shape, ordering, the 1-8 flight limit implied by maxItems, the qualification threshold context, and the unofficial-source disclaimer. An agent has everything needed to call this correctly.

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 coverage is 100%, so the baseline is 3; the description clears that by explaining sm's role ('the Qualifying Miles so far') and by naming calculate_flight_distance as the source of the miles field. The inline class-percentage table largely duplicates the cls enum documentation, which caps it below 5.

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?

The opening sentence states a precise verb+resource: Royal Orchid Plus miles and Qualifying Miles for THAI flights. It also pins the scope hard ('Takes no price', 'THAI flights'), which cleanly separates it from the ~50 sibling airline calculators that share its shape.

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 says what inputs to supply and where to get them ('calculate_flight_distance gives them'), and routes partner-program crediting to the creditTo path. What it lacks is an explicit when-not statement (e.g. 'do not use for non-THAI-operated segments'), so the routing guidance is clear but not exhaustive.

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