Skip to main content
Glama

cwsi.net Fare Classes & Mileage Calculators

Calculate flight distance

calculate_flight_distance
Read-onlyIdempotent

Great-circle distance in miles, nautical miles and kilometres for a route, leg by leg and in total, from cwsi.net's Great Circle Distance Calculator. Give airport codes joined by "-", e.g. ATL-SFO-ATL, with "" between separate trips, e.g. ATL-SFOSJC-ATL.

Input Schema

NameRequiredDescriptionDefault
routeYesAirport codes joined by "-" (spaces or commas also work), e.g. "ATL-SFO-ATL". Use "~" between separate trips, e.g. "ATL-SFO~SJC-ATL". Codes are 3 or 4 letters or digits; each trip needs 2 or more; at most 5 trips and 20 codes.

Output Schema

NameRequiredDescriptionDefault
kmYes
miYes
nmYes
okYes
linkYes
tripsYes
unknownYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely useful context beyond that: the data source (cwsi.net's Great Circle Distance Calculator) and the fact that results are broken out per leg and in total.

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?

Two tight sentences with the capability statement front-loaded and the input syntax second. Nothing is wasted, though the syntax detail partially duplicates the schema description.

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, the description needn't explain return values, and it does state what is returned (miles, nautical miles, kilometres, per leg and total). Annotations cover safety and an output schema covers results, so an agent has everything needed to invoke it.

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 coverage is 100% and the schema already documents the route format, delimiters, code length, and trip/code limits. The description's examples largely restate what the schema says, so the baseline 3 applies; it adds only the concrete ATL-SFO~SJC-ATL pattern.

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) and resource (great-circle flight distance) and names the three output units plus leg-by-leg and total aggregation, which no sibling does. It is clearly distinguishable from the ~55 airline-points calculators that share the 'calculate_' prefix.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides detailed input-format guidance ('-' joins legs, '~' separates trips) but never states when to choose this tool over the airline mileage calculators in the sibling set. The intended use (raw distance vs. loyalty accrual) is only implied.

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