Skip to main content
Glama

Airport Database API - IATA, ICAO, Flight Distance, METAR

airports_flight_distance
Read-onlyIdempotent

Airport database + flight distance in one call: IATA/ICAO lookup, airports near a point, great-circle distance, flight time and CO2 per passenger (official UK DEFRA 2025 factors), plus live METAR/TAF. Open data, no API key, no proxy. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.02/call via x402 at https://radarbg.com/x402/airports-flight-distance.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "mode": "distance",
      "codes": [
        "JFK",
        "LHR",
        "SOF"
      ],
      "routes": [
        "JFK-LHR",
        "SOF-VAR",
        "LAX-NRT"
      ],
      "latitude": 43.2321
    },
    "name": "airports_flight_distance"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNodistance = great-circle distance, bearing and estimated flight time for routes like JFK-LHR. lookup = full airport details by IATA/ICAO code. search = find airports by text, country or type. nearby = airports around a latitude/longitude. we
codesNoIATA (3 letters, e.g. JFK) or ICAO (4 characters, e.g. EGLL) airport codes. For weather mode, ICAO codes of any station also work. For airline mode: airline IATA (BA, W6), ICAO (BAW) codes or names (Ryanair).
queryNoText to find in airport name, city, code or keywords, for example 'heathrow', 'varna' or 'international'. Can be combined with country and type filters. In airline mode: text in the airline name, alias or callsign, e.g. 'wizz' or 'speedbird
typesNoFilter by type: large_airport, medium_airport, small_airport, heliport, seaplane_base, balloonport, closed. Empty = all open airport types in search mode, and large/medium/small airports in nearby mode.
routesNoAirport pairs as IATA or ICAO codes, for example JFK-LHR, SOF-VAR, LAX-NRT. Accepted separators: dash, 'to', '>' or space.
countryNoTwo-letter ISO country code, for example US, GB, BG, DE. Empty = all countries. In airline mode: ISO 2-letter code lists that country's airlines (e.g. BG).
latitudeNoLatitude of the center point in decimal degrees, for example 43.2321 (Varna).
radiusKmNoSearch radius around the point in kilometers.
longitudeNoLongitude of the center point in decimal degrees, for example 27.8251 (Varna).
includeTafNoAlso return the latest TAF (terminal aerodrome forecast) for each station, raw text.
includeFaaDelaysNoweather and lookup modes: add faaDelays to every US airport row - official FAA NAS status right now (ground stop, ground delay program with avg/max minutes, arrival/departure delays, closures). Non-US airports are unchanged. One extra free
activeAirlinesOnlyNoAirline mode: for name, query and country searches return only airlines marked active. Code lookups always return the best match (active first) and list other airlines that used the same code.
scheduledServiceOnlyNoKeep only airports that have scheduled passenger flights. Turn off to also see small airfields.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.3/5.0
Behavior4/5

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

Annotations already declare readOnly, openWorld and idempotent, so the safety profile is covered. The description adds genuinely non-obvious operational context: a hard free-tier cap of 5 calls/day per IP, two paid access paths (X-API-Key or x402 per-call payment), no proxy, and the DEFRA 2025 emissions factor provenance. That is exactly the kind of auth/rate-limit information annotations cannot carry.

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 capability list is front-loaded and dense, but it is delivered as one long run-on sentence followed by a pricing sentence with two full URLs and euro/dollar figures. The commercial detail is useful but occupies nearly half the text and crowds out behavioral detail an agent would value more. Nothing is actively wasteful, but the structure is a data dump rather than a prioritized brief.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 13-parameter, multi-mode tool with no output schema, the description lists what each capability produces only at a high level (distance, flight time, CO2, raw METAR/TAF). It never explains how the five modes interact, what a response object looks like, or what happens with mixed mode/parameter combinations. Adequate to identify the tool, thin for calling it confidently across modes.

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% across 13 parameters, so the input schema already explains codes, routes, types, radius and the includeTaf/includeFaaDelays flags. The description adds only marginal parameter meaning, mainly that CO2 uses official UK DEFRA 2025 factors and that TAF is returned as raw text. Baseline 3 applies when the schema does the heavy lifting.

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 concrete resources and operations: IATA/ICAO lookup, airports near a point, great-circle distance, flight time, CO2 per passenger and METAR/TAF. That is a specific, recognizable capability set rather than a restatement of the name. It does not, however, distinguish the tool from siblings such as airport_delays_weather or airport_report, whose overlap with the METAR/TAF portion is left unaddressed.

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

Usage Guidelines2/5

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

There is no stated when-to-use or when-not-to-use guidance and no routing to alternatives, even though the family contains several airport-related tools. A caller must infer from the schema which mode to pick and when this tool is preferable to airport_delays_weather. The only contextual signals given are commercial (free tier, paid key), not usage-based.

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