Skip to main content
Glama
BACH-AI-Tools

Flightradar24 MCP Server

get_airline_info

Retrieve airline details including name, ICAO, and IATA codes by providing a valid ICAO code. This tool helps identify airlines from their codes within flight tracking systems.

Instructions

Returns airline name, ICAO and IATA codes. REQUIRED: icao code must be provided and non-empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
icaoYesAirline ICAO code.

Implementation Reference

  • The MCP tool handler function for 'get_airline_info'. It extracts the ICAO code from input parameters, fetches the airline information using FR24Client, formats the response as text content, and handles errors appropriately.
    async (params: z.infer<typeof airlineInfoSchema>) => {
      const { icao } = params;
      try {
        console.log(`Raw params received by handler: ${JSON.stringify(params)}`);
        const airline = await fr24Client.getAirlineInfo(icao);
        return {
          content: [{
            type: 'text' as const,
            text: `Airline information (light):\n${JSON.stringify(airline, null, 2)}`
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: 'text' as const,
            text: `Error fetching airline info for ${icao}: ${error instanceof Error ? error.message : 'Unknown error'}`
          }],
          isError: true
        };
      }
    }
  • src/server.ts:391-416 (registration)
    Registration of the 'get_airline_info' tool on the McpServer instance, specifying name, description, input schema, and handler function.
    server.tool(
      'get_airline_info',
      'Returns airline name, ICAO and IATA codes. REQUIRED: icao code must be provided and non-empty.',
      airlineInfoSchema.shape,
      async (params: z.infer<typeof airlineInfoSchema>) => {
        const { icao } = params;
        try {
          console.log(`Raw params received by handler: ${JSON.stringify(params)}`);
          const airline = await fr24Client.getAirlineInfo(icao);
          return {
            content: [{
              type: 'text' as const,
              text: `Airline information (light):\n${JSON.stringify(airline, null, 2)}`
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: 'text' as const,
              text: `Error fetching airline info for ${icao}: ${error instanceof Error ? error.message : 'Unknown error'}`
            }],
            isError: true
          };
        }
      }
    );
  • Zod schema defining the input parameters for the 'get_airline_info' tool: a required 'icao' string.
    const airlineInfoSchema = z.object({ icao: z.string().min(1).describe('Airline ICAO code.') });
  • Helper method in FR24Client class that makes the API request to retrieve airline information from the Flightradar24 API endpoint.
    async getAirlineInfo(icao: string): Promise<AirlineInfo> {
      return this.makeRequest<AirlineInfo>(`/static/airlines/${icao}/light`);
    }
  • TypeScript interface defining the structure of the AirlineInfo response object used by the tool.
    export interface AirlineInfo {
      icao: string;
      iata: string;
      name: string;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the required ICAO code constraint, which is useful, but lacks details on other behavioral traits like error handling, rate limits, authentication needs, or what happens if the ICAO code is invalid. For a read-only tool with no annotations, this leaves significant gaps in understanding its behavior.

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 appropriately sized and front-loaded, with two sentences that efficiently convey the tool's purpose and key requirement. Every sentence earns its place: the first states what it returns, and the second specifies the mandatory input, with no wasted words or redundancy.

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 the tool's low complexity (single parameter, no output schema, no annotations), the description is adequate but has clear gaps. It covers the basic purpose and input requirement, but without annotations or output schema, it should ideally include more about return values or error cases to be fully complete for agent use.

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 input schema has 100% description coverage, with the 'icao' parameter documented as 'Airline ICAO code.' The description adds value by emphasizing that 'icao code must be provided and non-empty,' reinforcing the requirement beyond the schema's 'minLength: 1' and 'required' field. However, it doesn't provide additional semantic context, such as format examples or validation rules, so it meets the baseline for high schema coverage.

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 tool's purpose: 'Returns airline name, ICAO and IATA codes.' It specifies the verb ('Returns') and resource ('airline name, ICAO and IATA codes'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like get_airport_info_full or get_flight_summary_count, which focus on airports and flights rather than airlines.

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 provides implied usage guidance by stating 'REQUIRED: icao code must be provided and non-empty,' which indicates when to use this tool (when you have an ICAO code). However, it doesn't explicitly mention when not to use it or suggest alternatives among the sibling tools, such as using get_airport_info_full for airport data instead.

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/BACH-AI-Tools/fr24api-mcp'

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