Skip to main content
Glama
BACH-AI-Tools

Flightradar24 MCP Server

get_airport_info_full

Retrieve comprehensive airport details including full name, codes, location, elevation, country, city, state, and timezone information using IATA or ICAO airport codes.

Instructions

Returns detailed airport information: full name, ICAO and IATA codes, localization, elevation, country, city, state, timezone details. REQUIRED: code must be provided and non-empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesAirport IATA or ICAO code.

Implementation Reference

  • Primary MCP tool handler and registration for 'get_airport_info_full'. Extracts airport code from params, fetches data via FR24Client, formats and returns as text content, handles errors.
    server.tool(
      'get_airport_info_full',
      'Returns detailed airport information: full name, ICAO and IATA codes, localization, elevation, country, city, state, timezone details. REQUIRED: code must be provided and non-empty.',
      airportInfoFullSchema.shape,
      async (params: z.infer<typeof airportInfoFullSchema>) => {
        const { code } = params;
        try {
          console.log(`Raw params received by handler: ${JSON.stringify(params)}`);
          const airport = await fr24Client.getAirportInfoFull(code);
          return {
            content: [{
              type: 'text' as const,
              text: `Airport information (full):\n${JSON.stringify(airport, null, 2)}`
            }]
          };
        } catch (error) {
          return {
            content: [{
              type: 'text' as const,
              text: `Error fetching full airport info for ${code}: ${error instanceof Error ? error.message : 'Unknown error'}`
            }],
            isError: true
          };
        }
      }
    );
  • FR24Client method implementing the core API call for full airport information.
    async getAirportInfoFull(code: string): Promise<AirportFullInfo> {
      return this.makeRequest<AirportFullInfo>(`/static/airports/${ code}/full`);
    }
  • Zod input schema validation for the tool parameters.
    const airportInfoFullSchema = z.object({ code: z.string().min(1).describe('Airport IATA or ICAO code.') });
  • TypeScript interface defining the structure of full airport information returned by the API.
    export interface AirportFullInfo {
      name: string;
      iata: string;
      icao: string;
      lon: number;
      lat: number;
      elevation: number;
      country: CountryInfo;
      city: string;
      state: string | null;
      timezone: TimezoneInfo;
    }
  • Generic HTTP request helper method used by getAirportInfoFull to make authenticated API calls to Flightradar24.
    private async makeRequest<T>(endpoint: string, params?: Record<string, any>): Promise<T> {
      try {
        console.log(`Making request to ${endpoint} with params: ${JSON.stringify(params)}`);
        const response = await axios.get(`${this.baseUrl}${endpoint}`, {
          params: params,
          headers: {
            'Accept': 'application/json',
            'Accept-Version': 'v1',
            'Authorization': `Bearer ${this.apiKey}`
          }
        });
        // Handle responses nested under 'data' key, except for count endpoints and single objects
        if (response.data && response.data.data && Array.isArray(response.data.data)) {
          return response.data.data as T;
        }
        // Handle count responses
        if (response.data && typeof response.data.record_count === 'number') {
          return response.data as T;
        }
        // Handle single object responses (like flight tracks, airport info, airline info)
        if (response.data && typeof response.data === 'object' && !Array.isArray(response.data)) {
            return response.data as T;
        }
        // Fallback for unexpected structure
        return response.data as T;
      } catch (error) {
        const message = error instanceof AxiosError ? error.message : 'Unknown error';
        console.error(`API Request Failed: ${endpoint}`, error);
        throw new Error(`Failed request to ${endpoint}: ${message}`);
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states this is a read operation ('Returns'), which is clear, but lacks details about rate limits, error handling, authentication needs, or response format. The description doesn't explain what happens if the code is invalid or if data is unavailable, leaving behavioral gaps for an agent.

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 sized with two sentences: one listing the returned information and another stating the requirement. It's front-loaded with the core purpose. However, the list of fields could be slightly condensed (e.g., 'localization' might be vague), and it lacks structural markers like bullet points, but overall it's efficient with zero wasted words.

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 (1 parameter, no nested objects) and high schema coverage, the description is minimally adequate. However, with no annotations and no output schema, it fails to explain the return format or behavioral traits like error handling. For a read-only tool, this is a moderate gap, as agents need to understand what 'detailed airport information' entails in practice.

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%, with the single parameter 'code' fully documented in the schema as 'Airport IATA or ICAO code.' The description adds minimal value beyond this, only reiterating that the code is 'REQUIRED' and 'must be provided and non-empty,' which is already implied by the schema's required field and minLength constraint. Baseline 3 is appropriate as the schema does the heavy lifting.

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 detailed airport information' with specific fields listed (full name, codes, localization, etc.). It distinguishes from the sibling 'get_airport_info_light' by emphasizing 'detailed' and listing comprehensive fields, though it doesn't explicitly contrast with that sibling. The verb 'Returns' is specific and the resource 'airport information' is well-defined.

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 but offers no context about when this detailed airport info is needed over the 'light' version or other flight-related tools. There's no mention of prerequisites, alternatives, or exclusions, leaving usage decisions 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