Skip to main content
Glama

cwsi.net Fare Classes & Mileage Calculators

SriLankan Airlines FlySmiLes Miles Calculator

calculate_srilankan_airlines_miles
Read-onlyIdempotent

SriLankan Airlines FlySmiLes miles for SriLankan Airlines flights. Miles = distance x booking-class % (J 225; C 200; D 175; I, Y, B, P, H 150; K, W, M, E 125; L, R, V, S 100; N, Q, O 60; G 50), rounded down, no minimum; T, U, X, Z, A and F are not listed. The 25% Platinum and 15% Gold bonus is a note only (SriLankan does not say what it is a share of), and tier miles are not calculated. 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
clsNoBooking class. J = J (Business Flex 225%); C = C (Business Semi Flex 200%); D = D (Business Value 175%); I = I (Business Saver 150%); Y = Y (Economy Flex 150%); B = B (Economy Flex 150%); P = P (Economy Flex 150%); H = H (Economy Flex 150%); K = K (Economy Semi Flex 125%); W = W (Economy Semi Flex 125%); M = M (Economy Semi Flex 125%); E = E (Economy Semi Flex 125%); L = L (Economy Value 100%); R = R (Economy Value 100%); V = V (Economy Value 100%); S = S (Economy Value 100%); N = N (Economy Saver 60%); Q = Q (Economy Saver 60%); O = O (Economy Saver 60%); G = G (Economy (G class) 50%). The letter on your ticket. J, C, D and I are Business; the rest are Economy. Classes FlySmiLes does not list (T, U, X, Z, A, F) are not offered.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 FlySmiLes tier. BL = Blue; CL = Classic; GD = Gold; PL = Platinum. Gold and Platinum get a 15% and 25% tier bonus on flights SriLankan markets and operates; it is explained below the result, not added.BL
creditToNoCredit the flights to a partner program instead of SriLankan Airlines's own: american = American AAdvantage (creditStatus one of: AAdvantage member, AAdvantage Gold, AAdvantage Platinum, AAdvantage Platinum Pro, AAdvantage Executive Platinum); alaska = Atmos Rewards (creditStatus one of: Atmos Rewards member, Atmos Silver, Atmos Gold, Atmos Platinum, Atmos Titanium); ba-club = British Airways Club (creditStatus one of: Blue, Bronze, 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. Added

TDQS

A4.4/5.0
Behavior5/5

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

It discloses traits beyond the annotations: the exact earning formula, rounding down with no minimum, classes not listed (T/U/X/Z/A/F), that tier bonuses are note-only and unexplained, that tier miles are not calculated, that it takes no price, and that it's unofficial/uses cwsi.net. This is unusually rich behavioral context.

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?

It's dense but front-loaded with the essential formula and purpose first, followed by scoping and caveats. The parenthetical class list is lengthy but necessary for accuracy; overall efficient with minimal waste.

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 complex partner-crediting parameters (creditTo, creditClass, creditFlights, status) and 100% schema coverage with an output schema, the description covers the earning rule, exclusions, bonuses, and source, leaving nothing critical missing 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 8 parameters (segs, cls, trip, status, creditTo, etc.) thoroughly. The description adds the formula context but no parameter-level detail beyond the schema, so baseline 3 is appropriate.

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 description states a specific verb+resource (calculate FlySmiLes miles for SriLankan flights) and, importantly, differentiates from sibling tools by listing the exact earning formula and booking-class percentages. Among ~50 similar calculators, this makes the specific airline and rules unmistakable.

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 clearly specifies inputs ('Give segs: one entry per one-way flight, in order, with its great-circle miles ... and the ISO country codes'), which tells the agent when the tool is applicable. It doesn't explicitly name alternatives, but its airline specificity implicitly excludes sibling tools.

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