Skip to main content
Glama

cwsi.net Fare Classes & Mileage Calculators

Copa Airlines ConnectMiles Calculator

calculate_copa_airlines_miles
Read-onlyIdempotent

Copa Airlines ConnectMiles miles, qualifying miles and qualifying segments for Copa Airlines flights. Miles = distance x fare family % (Economy Basic 50, Economy Classic 100, Economy Full and Business Promo 175, Business Full 300), at least 500 per flight; qualifying miles are the same; booking classes G, I, N, P, X and Z earn nothing (noearn Y). PreferMember bonus on miles only (Silver 25%, Gold 50%, Platinum 75%, Presidential 100%). Progress toward Silver, Gold, Platinum and Presidential by qualifying miles (20,000 / 40,000 / 70,000 / 90,000) or segments in a calendar year; qm and qs are the totals 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
qmNoQualifying miles you have this calendar year (optional). Used only for the progress toward the next PreferMember status.
qsNoQualifying segments you have this calendar year (optional). Economy Basic counts half a segment.
famNoFare family. EB = Economy Basic (Economy, 50%); EC = Economy Classic or Classic Flex (Economy, 100%); EF = Economy Full (Economy, 175%); BP = Business Promo (Business, 175%); BF = Business Full (Business, 300%). The fare family on your Copa Airlines ticket. Economy Basic earns half the distance; Business Full earns triple.EC
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
noearnNoIs your booking class G, I, N, P, X or Z?. N = No; Y = Yes (earns nothing). Copa Airlines says these classes earn no miles or segments. Choose No if you do not know.N
statusNoYour PreferProgram status. NO = Not a PreferMember; SI = Silver (+25%); GO = Gold (+50%); PL = Platinum (+75%); PR = Presidential (+100%). The PreferMember bonus is paid on award miles for Copa Airlines flights; it does not count toward status.NO
creditToNoCredit the flights to a partner program instead of Copa Airlines'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); 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. The flights are segs (their miles), or creditFlights.
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. Changed4 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 Copa Airlines'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); 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. The flights are segs (their miles), or creditFlights.",
      +  "enum": [
      +    "united",
      +    "aeroplan",
      +    "flying-blue"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare this is a read-only, idempotent, non-destructive, closed-world computation, so the safety profile is covered. The description goes further by disclosing the provenance ('Uses cwsi.net's calculator and the airline's published rules') and the fact that it is 'Unofficial', plus the full deterministic earning logic, which is genuine added context. It does not cover failure modes or edge cases.

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?

Everything is compressed into a single front-loaded paragraph that opens with what is computed before moving to rules and inputs, and no sentence is pure filler. It is dense and unsegmented, and portions duplicate the schema, which keeps it short of a 5.

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 an 11-parameter tool with an output schema and annotations already present, the description covers the earning rules, the partner-credit path, the segs input shape and the qualifying-status thresholds, which is enough for correct invocation. Return values need not be described since an output schema exists.

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 schema itself is extremely detailed (fare-family percentages, enum labels, segs structure), so the baseline is 3. The description largely restates those same rules (fare family percentages, status bonuses, no-earn classes, qm/qs as year-to-date totals) rather than adding meaning beyond the schema, though 'Takes no price' and the segs ordering hint add marginal value.

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 names a specific verb and resource — computing ConnectMiles award miles, qualifying miles and qualifying segments for Copa flights — and spells out the earning model, so the agent knows exactly what is produced. It distinguishes itself from the ~50 sibling calculators mainly through the airline-specific rules it enumerates rather than an explicit contrast statement.

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 gives concrete invocation guidance: 'Give segs: one entry per one-way flight, in order, with its great-circle miles (calculate_flight_distance gives them)', names the prerequisite sibling tool, and states 'Takes no price' plus 'leave creditTo out for the airline's own program'. What is missing is an explicit when-not-to-use or a routing statement against other airlines' calculators, though that is largely implied by the airline name.

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