Skip to main content
Glama
BACH-AI-Tools

Flightradar24 MCP Server

get_live_flights_positions_light

Retrieve real-time aircraft positions and flight data by specifying search parameters like flight numbers, callsigns, or geographic areas to monitor live air traffic.

Instructions

Returns real-time aircraft flight movement information including latitude, longitude, speed, and altitude. IMPORTANT: At least one search parameter (other than limit) must be provided and non-empty. Choose from: bounds, flights, callsigns, registrations, painted_as, operating_as, airports, routes, aircraft, altitude_ranges, squawks, categories, data_sources, airspaces, gspeed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boundsNoCoordinates defining an area. Order: north, south, west, east (comma-separated float values).
flightsNoFlight numbers (comma-separated values, max 15).
callsignsNoFlight callsigns (comma-separated values, max 15).
registrationsNoAircraft registration numbers (comma-separated values, max 15).
painted_asNoAircraft painted in an airline's livery (ICAO code, comma-separated, max 15).
operating_asNoAircraft operating under an airline's call sign (ICAO code, comma-separated, max 15).
airportsNoAirports (IATA/ICAO/ISO 3166-1 alpha-2) or countries. Use format: [direction:]<code>. Directions: inbound, outbound, both.
routesNoFlights between airports/countries (e.g., SE-US, ESSA-JFK). Max 15.
aircraftNoAircraft ICAO type codes (comma-separated, max 15).
altitude_rangesNoFlight altitude ranges in feet (e.g., 0-3000, 5000-7000).
squawksNoSquawk codes in hex format (comma-separated).
categoriesNoCategories of Flights (comma-separated: P, C, M, J, T, H, B, G, D, V, O, N).
data_sourcesNoSource of information (comma-separated: ADSB, MLAT, ESTIMATED).
airspacesNoFlight information region in lower or upper airspace.
gspeedNoFlight ground speed in knots (single value or range, e.g., 120-140, 80).
limitNoLimit of results. Recommended, unless needed. Max 30000.

Implementation Reference

  • MCP tool handler function that validates input parameters, cleans them, calls FR24Client.getLivePositionsLight(), and returns the result as formatted text or error response.
    async (params: z.infer<typeof liveFlightPositionsSchema>) => {
      try {
        validateHasRequiredParams(params, ['limit']);
        const cleaned = cleanParams(params);
        const result = await fr24Client.getLivePositionsLight(cleaned);
        return {
          content: [{
            type: 'text' as const,
            text: `Found ${result.length} flights (light details):\n${JSON.stringify(result, null, 2)}`
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: 'text' as const,
            text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`
          }],
          isError: true
        };
      }
    }
  • Zod schema defining the input parameters for the live flight positions tool (baseFlightPositionsSchema, aliased as liveFlightPositionsSchema).
    const baseFlightPositionsSchema = z.object({
      bounds: z.string().min(1).optional().describe('Coordinates defining an area. Order: north, south, west, east (comma-separated float values).'),
      flights: z.string().min(1).optional().describe('Flight numbers (comma-separated values, max 15).'),
      callsigns: z.string().min(1).optional().describe('Flight callsigns (comma-separated values, max 15).'),
      registrations: z.string().min(1).optional().describe('Aircraft registration numbers (comma-separated values, max 15).'),
      painted_as: z.string().min(1).optional().describe("Aircraft painted in an airline's livery (ICAO code, comma-separated, max 15)."),
      operating_as: z.string().min(1).optional().describe("Aircraft operating under an airline's call sign (ICAO code, comma-separated, max 15)."),
      airports: z.string().min(1).optional().describe('Airports (IATA/ICAO/ISO 3166-1 alpha-2) or countries. Use format: [direction:]<code>. Directions: inbound, outbound, both.'),
      routes: z.string().min(1).optional().describe('Flights between airports/countries (e.g., SE-US, ESSA-JFK). Max 15.'),
      aircraft: z.string().min(1).optional().describe('Aircraft ICAO type codes (comma-separated, max 15).'),
      altitude_ranges: z.string().min(1).optional().describe('Flight altitude ranges in feet (e.g., 0-3000, 5000-7000).'),
      squawks: z.string().min(1).optional().describe('Squawk codes in hex format (comma-separated).'),
      categories: z.string().min(1).optional().describe('Categories of Flights (comma-separated: P, C, M, J, T, H, B, G, D, V, O, N).'),
      data_sources: z.string().min(1).optional().describe('Source of information (comma-separated: ADSB, MLAT, ESTIMATED).'),
      airspaces: z.string().min(1).optional().describe('Flight information region in lower or upper airspace.'),
      gspeed: z.string().min(1).optional().describe('Flight ground speed in knots (single value or range, e.g., 120-140, 80).'),
      limit: z.number().optional().describe('Limit of results. Recommended, unless needed. Max 30000.')
    });
  • src/server.ts:118-142 (registration)
    Registration of the MCP tool with name, description, input schema, and handler function.
      'get_live_flights_positions_light',
      'Returns real-time aircraft flight movement information including latitude, longitude, speed, and altitude. IMPORTANT: At least one search parameter (other than limit) must be provided and non-empty. Choose from: bounds, flights, callsigns, registrations, painted_as, operating_as, airports, routes, aircraft, altitude_ranges, squawks, categories, data_sources, airspaces, gspeed.',
      liveFlightPositionsSchema.shape,
      async (params: z.infer<typeof liveFlightPositionsSchema>) => {
        try {
          validateHasRequiredParams(params, ['limit']);
          const cleaned = cleanParams(params);
          const result = await fr24Client.getLivePositionsLight(cleaned);
          return {
            content: [{
              type: 'text' as const,
              text: `Found ${result.length} flights (light details):\n${JSON.stringify(result, null, 2)}`
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: 'text' as const,
              text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}`
            }],
            isError: true
          };
        }
      }
    );
  • FR24Client method that performs the actual API request for light live flight positions data.
    async getLivePositionsLight(params: LiveFlightPositionsQueryParams): Promise<FlightPositionLight[]> {
      return this.makeRequest<FlightPositionLight[]>('/live/flight-positions/light', params);
    }
  • Helper function to remove null, undefined, and empty string properties from parameters.
    function cleanParams<T extends Record<string, any>>(params: T): Partial<T> {
      const cleaned: Partial<T> = {};
      for (const key in params) {
        if (params[key] !== null && params[key] !== undefined && params[key] !== '') {
          cleaned[key] = params[key];
        }
      }
      return cleaned;

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the important constraint that at least one non-limit parameter is required, which is valuable. However, it does not clarify what 'light' means, potential response limitations, or any other behavioral characteristics.

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?

The description is compact: one purpose sentence, an important note, and a list of parameter names. The list is long but necessary to convey valid search parameters. It front-loads the main purpose and wastes no words.

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?

Given 16 parameters, no annotations, and no output schema, the description provides the key invocation constraint and hints at return content (latitude, longitude, speed, altitude). However, it does not explain the 'light' vs 'full' distinction or the response structure, leaving some ambiguity.

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?

The schema description coverage is 100%, so all 16 parameters already have detailed descriptions. The tool description merely lists parameter names and notes 'limit' as an exception, adding no new semantic information beyond what the schema provides. Baseline 3 is appropriate.

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 clearly states it returns real-time aircraft flight movement data with specific fields (latitude, longitude, speed, altitude), using the specific verb 'Returns'. It identifies the resource precisely, but it does not explicitly distinguish from the sibling 'full' variant beyond the name 'light'.

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?

The description provides explicit usage guidance: at least one search parameter (other than limit) must be provided and non-empty, and it lists all acceptable filter parameters. It does not mention alternatives or when to prefer the 'full' variant, but the context is clear for correct invocation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.