Skip to main content
Glama
BACH-AI-Tools

Flightradar24 MCP Server

get_airport_info_light

Retrieve airport details including name, ICAO, and IATA codes by providing an airport code to access aviation information from Flightradar24 data.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesAirport IATA or ICAO code.

Implementation Reference

  • The handler function that executes the tool logic: destructures the 'code' param, fetches airport info via FR24Client, returns formatted JSON text or error.
    async (params: z.infer<typeof airportInfoLightSchema>) => {
      const { code } = params;
      try {
        console.log(`Raw params received by handler: ${JSON.stringify(params)}`);
        const airport = await fr24Client.getAirportInfoLight(code);
        return {
          content: [{
            type: 'text' as const,
            text: `Airport information (light):\n${JSON.stringify(airport, null, 2)}`
          }]
        };
      } catch (error) {
        return {
          content: [{
            type: 'text' as const,
            text: `Error fetching light airport info for ${code}: ${error instanceof Error ? error.message : 'Unknown error'}`
          }],
          isError: true
        };
      }
    }
  • Zod input schema defining the required 'code' parameter for the tool.
    const airportInfoLightSchema = z.object({ code: z.string().min(1).describe('Airport IATA or ICAO code.') });
  • src/server.ts:418-443 (registration)
    Registration of the tool using McpServer.tool() with name, description, schema, and handler.
    server.tool(
      'get_airport_info_light',
      'Returns airport name, ICAO and IATA codes. REQUIRED: code must be provided and non-empty.',
      airportInfoLightSchema.shape,
      async (params: z.infer<typeof airportInfoLightSchema>) => {
        const { code } = params;
        try {
          console.log(`Raw params received by handler: ${JSON.stringify(params)}`);
          const airport = await fr24Client.getAirportInfoLight(code);
          return {
            content: [{
              type: 'text' as const,
              text: `Airport information (light):\n${JSON.stringify(airport, null, 2)}`
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: 'text' as const,
              text: `Error fetching light airport info for ${code}: ${error instanceof Error ? error.message : 'Unknown error'}`
            }],
            isError: true
          };
        }
      }
    );
  • Helper method in FR24Client that makes the API request to fetch light airport information.
    async getAirportInfoLight(code: string): Promise<AirportInfoLight> {
      return this.makeRequest<AirportInfoLight>(`/static/airports/${code}/light`);
    }
  • TypeScript interface defining the structure of the AirportInfoLight output.
    export interface AirportInfoLight {
      name: string;
      iata: string;
      icao: string;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It only states the tool returns data and has a required parameter, but doesn't mention error handling, rate limits, authentication needs, or what happens with invalid codes. For a read operation with zero annotation coverage, this is insufficient.

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 appropriately concise with two sentences that each serve a purpose: the first states what the tool returns, the second specifies a requirement. There's no unnecessary information, though it could be more front-loaded with usage context.

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?

Given no annotations and no output schema, the description is incomplete for a tool that returns data. It doesn't explain the format or structure of returned information (e.g., whether it's a single object or list), error responses, or how it differs from the 'full' version, leaving significant gaps for an AI agent.

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%, so the schema already fully documents the single parameter. The description adds that the code 'must be provided and non-empty,' which slightly reinforces the schema's required constraint and minLength, but doesn't provide additional semantic meaning beyond what's in the structured data.

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 airport name, ICAO and IATA codes.' It specifies the verb ('Returns') and resource ('airport name, ICAO and IATA codes'), but doesn't explicitly differentiate from sibling tools like 'get_airport_info_full' beyond the 'light' naming convention.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It mentions a required parameter constraint but doesn't explain when to choose this 'light' version over 'get_airport_info_full' or other airport-related tools, leaving usage context unclear.

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