Skip to main content
Glama
BACH-AI-Tools

Flightradar24 MCP Server

get_historic_flight_events_light

Retrieve historical flight events like takeoff, landing, and gate transitions for specific flights using Flightradar24 data.

Instructions

Returns selected historical flight events (gate_departure, takeoff, cruising, airspace_transition, resuming_flightplan, descent, landed, gate_arrival), sorted by event_timestamp and grouped by flight_id. REQUIRED: flight_ids and event_types must be provided and non-empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flight_idsYesComma-separated fr24_ids (maximum 15 IDs). Cannot be combined with event_datetime.
event_typesYesEvent types to filter by (comma-separated values). Available values: all, gate_departure, takeoff, cruising, airspace_transition, descent, landed, gate_arrival.

Implementation Reference

  • Core implementation of the getHistoricFlightEventsLight method, which invokes the makeRequest helper to fetch light historic flight events from the FR24 API endpoint '/historic/flight-events/light'.
    async getHistoricFlightEventsLight(params: HistoricFlightEventsQueryParams): Promise<HistoricFlightEventsLight[]> {
      return this.makeRequest<HistoricFlightEventsLight[]>('/historic/flight-events/light', params);
    }
  • Zod input schema for validating tool parameters: flight_ids (comma-separated FR24 flight IDs) and event_types.
    const historicFlightEventsSchema = z.object({
      flight_ids: z.string().min(1).describe('Comma-separated fr24_ids (maximum 15 IDs). Cannot be combined with event_datetime.'),
      event_types: z.string().min(1).describe('Event types to filter by (comma-separated values). Available values: all, gate_departure, takeoff, cruising, airspace_transition, descent, landed, gate_arrival.')
    });
  • src/server.ts:498-522 (registration)
    MCP server tool registration for 'get_historic_flight_events_light', including description, input schema reference, and the handler function that delegates to FR24Client.
    server.tool(
      'get_historic_flight_events_light',
      'Returns selected historical flight events (gate_departure, takeoff, cruising, airspace_transition, resuming_flightplan, descent, landed, gate_arrival), sorted by event_timestamp and grouped by flight_id. REQUIRED: flight_ids and event_types must be provided and non-empty.',
      historicFlightEventsSchema.shape,
      async (params: z.infer<typeof historicFlightEventsSchema>) => {
        try {
          console.log(`Raw params received by handler: ${JSON.stringify(params)}`);
          const result = await fr24Client.getHistoricFlightEventsLight(params);
          return {
            content: [{
              type: 'text' as const,
              text: `Found ${result.length} flights with historic events (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
          };
        }
      }
    );
  • TypeScript type definition for input parameters matching the Zod schema.
    export interface HistoricFlightEventsQueryParams {
      flight_ids: string; // Required, comma-separated fr24_ids (maximum 15 IDs)
      event_types: string; // Required, comma-separated event types or 'all'
    }
  • TypeScript type definition for the light output response structure containing flight ID, callsign, hex, and list of events.
    export interface HistoricFlightEventsLight {
      fr24_id: string;
      callsign: string;
      hex: string;
      events: FlightEvent[];
    }

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?

With no annotations, the description carries the burden of behavioral disclosure. It adds useful info about sorting by event_timestamp and grouping by flight_id, and emphasizes non-empty required fields. However, it omits details such as response structure, pagination, rate limits, or what 'light' means in terms of returned fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, both information-dense. The first sentence lists event types and specifies sorting/grouping; the second provides a clear constraint. There is no fluff or repetition, and key details are front-loaded.

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?

The description is largely sufficient for a simple 2-parameter tool with full schema coverage. It explains the event types, result ordering, and required inputs. However, it lacks a comparison with the 'full' sibling, which would help an agent understand if this lighter variant is appropriate. The absence of an output schema is mitigated by the clear purpose.

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%: both flight_ids and event_types have descriptive text in the schema. The description only repeats the requirement that they must be provided and non-empty, which is already captured by 'required' and 'minLength'. It adds no new semantic meaning beyond the schema.

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 the action ('Returns') and the resource ('historical flight events'), and specifies the event types and ordering/grouping behavior. However, it does not explicitly distinguish this 'light' version from the sibling 'get_historic_flight_events_full', so sibling differentiation is missing.

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?

The description implies a use case for retrieving historical events, but does not provide guidance on when to choose this tool over alternatives, such as the 'full' variant or flight positions tools. The 'REQUIRED' note relates to parameter constraints, not usage context.

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