Skip to main content
Glama
sunsetcoder

flightradar24-mcp-server

by sunsetcoder

get_flight_eta

Retrieve the estimated arrival time for a flight by providing its flight number. Helps track when a flight will land.

Instructions

Get estimated arrival time for a specific flight

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flightNumberYesFlight number (e.g., UA123)

Implementation Reference

  • The main handler for the 'get_flight_eta' tool. It extracts the flightNumber from arguments, validates it against the pattern /^[A-Z0-9]{2,8}$/, calls the FR24 API at /api/flights/detail with format='eta', and returns the response as text content.
    case 'get_flight_eta': {
      const { flightNumber } = toolArgs || {};
      const flightNumberStr = String(flightNumber || '');
    
      if (!flightNumberStr || !/^[A-Z0-9]{2,8}$/.test(flightNumberStr)) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'Invalid flight number format'
        );
      }
    
      const response = await fr24Client.get<FlightETAResponse>(
        '/api/flights/detail',
        {
          params: {
            flight: flightNumberStr,
            format: 'eta'
          }
        }
      );
    
      return {
        content: [{
          type: "text",
          text: JSON.stringify(response.data, null, 2)
        }]
      };
    }
  • src/index.ts:87-100 (registration)
    Tool registration in the ListToolsRequestSchema handler. Defines the tool name 'get_flight_eta', description, and inputSchema (requires flightNumber string with pattern ^[A-Z0-9]{2,8}$).
    {
      name: 'get_flight_eta',
      description: 'Get estimated arrival time for a specific flight',
      inputSchema: {
        type: 'object',
        properties: {
          flightNumber: {
            type: 'string',
            description: 'Flight number (e.g., UA123)',
            pattern: '^[A-Z0-9]{2,8}$'
          }
        },
        required: ['flightNumber']
      }
  • Type definition for FlightETAResponse, which wraps the FlightETA type used as the API response type.
    export interface FlightETAResponse {
      data: FlightETA;
    }
  • Type definition for FlightETA - the data structure returned by the ETA tool, including flight_number, departure/arrival info (airport, scheduled, actual/estimated times, delay), and status.
    export interface FlightETA {
      flight_number: string;
      departure: {
        airport: string;
        scheduled: string;
        actual: string;
        delay?: number;
      };
      arrival: {
        airport: string;
        scheduled: string;
        estimated: string;
        delay?: number;
      };
      status: 'scheduled' | 'active' | 'landed' | 'cancelled';
    }
Behavior2/5

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

No annotations provided; description does not disclose behavior like data freshness, error handling, or that it is a read operation.

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?

Single, short sentence with no wasted words; perfectly concise.

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

Completeness2/5

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

Low complexity but missing output description; agent cannot know what the tool returns (e.g., estimated arrival time format). Also lacks guidance on usage context.

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% with a description for flightNumber; tool description adds no extra parameter meaning, so baseline 3.

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?

Description clearly states verb 'Get' and resource 'estimated arrival time for a specific flight', differentiating from sibling 'get_flight_positions' which likely provides positions.

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?

Implies usage for a specific flight but provides no explicit when-to-use or when-not-to-use compared to sibling.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sunsetcoder/flightradar24-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server