get_historic_flight_events_full
Retrieve detailed historical flight events including gate departures, takeoffs, landings, and airspace transitions for specific flights, providing comprehensive timeline data for aviation analysis.
Instructions
Returns selected historical flight events (gate_departure, takeoff, cruising, airspace_transition, resuming_flightplan, descent, landed, gate_arrival), with detailed information, 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
| Name | Required | Description | Default |
|---|---|---|---|
| flight_ids | Yes | Comma-separated fr24_ids (maximum 15 IDs). Cannot be combined with event_datetime. | |
| event_types | Yes | Event types to filter by (comma-separated values). Available values: all, gate_departure, takeoff, cruising, airspace_transition, descent, landed, gate_arrival. |
Implementation Reference
- src/server.ts:472-496 (registration)MCP server.tool registration for the 'get_historic_flight_events_full' tool, including description, input schema, and execution handler.server.tool( 'get_historic_flight_events_full', 'Returns selected historical flight events (gate_departure, takeoff, cruising, airspace_transition, resuming_flightplan, descent, landed, gate_arrival), with detailed information, 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.getHistoricFlightEventsFull(params); return { content: [{ type: 'text' as const, text: `Found ${result.length} flights with historic events (full 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 }; } } );
- src/server.ts:97-100 (schema)Zod schema for validating tool input 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/fr24-client.ts:114-116 (handler)FR24Client class method implementing the core logic to fetch full historic flight events from the FR24 API endpoint.async getHistoricFlightEventsFull(params: HistoricFlightEventsQueryParams): Promise<HistoricFlightEventsFull[]> { return this.makeRequest<HistoricFlightEventsFull[]>('/historic/flight-events/full', params); }
- src/types.ts:207-210 (schema)TypeScript interface defining the query parameters type used by the FR24 client handler.export interface HistoricFlightEventsQueryParams { flight_ids: string; // Required, comma-separated fr24_ids (maximum 15 IDs) event_types: string; // Required, comma-separated event types or 'all' }
- src/types.ts:235-246 (schema)TypeScript interface defining the structure of the full historic flight events response.export interface HistoricFlightEventsFull { fr24_id: string; callsign: string; hex: string; operating_as: string; painted_as: string; orig_iata: string; orig_icao: string; dest_iata: string; dest_icao: string; events: FlightEvent[]; }