Skip to main content
Glama
BACH-AI-Tools

Flightradar24 MCP Server

get_flight_tracks

Retrieve positional track data for a specific flight using its Flightradar24 ID to monitor its route and location history.

Instructions

Returns positional tracks of a specific flight. REQUIRED: flight_id must be provided and non-empty.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
flight_idYesFlightradar24 ID of the flight (hexadecimal).

Implementation Reference

  • The MCP tool handler function for 'get_flight_tracks'. It receives parameters, calls FR24Client.getFlightTracks, formats the response with flight ID and JSON stringified tracks, or returns an error message.
    flightTracksSchema.shape,
    async (params: z.infer<typeof flightTracksSchema>) => {
      try {
        console.log(`Raw params received by handler: ${JSON.stringify(params)}`);
        const result = await fr24Client.getFlightTracks(params);
        const flightId = Array.isArray(result) && result.length > 0 ? result[0].fr24_id : 'unknown';
        return {
          content: [{
            type: 'text' as const,
            text: `Found track points for flight ${flightId}:\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
        };
      }
    }
  • Zod input schema for the 'get_flight_tracks' tool, validating a required 'flight_id' string parameter.
    const flightTracksSchema = z.object({
      flight_id: z.string().min(1).describe('Flightradar24 ID of the flight (hexadecimal).')
    });
  • src/server.ts:364-389 (registration)
    Registration of the 'get_flight_tracks' tool via server.tool(), including name, description, input schema reference, and inline handler function.
    server.tool(
      'get_flight_tracks',
      'Returns positional tracks of a specific flight. REQUIRED: flight_id must be provided and non-empty.',
      flightTracksSchema.shape,
      async (params: z.infer<typeof flightTracksSchema>) => {
        try {
          console.log(`Raw params received by handler: ${JSON.stringify(params)}`);
          const result = await fr24Client.getFlightTracks(params);
          const flightId = Array.isArray(result) && result.length > 0 ? result[0].fr24_id : 'unknown';
          return {
            content: [{
              type: 'text' as const,
              text: `Found track points for flight ${flightId}:\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
          };
        }
      }
    );
  • Supporting method in FR24Client class that handles the API call to fetch flight tracks data from '/flight-tracks' endpoint.
    async getFlightTracks(params: FlightTracksQueryParams): Promise<FlightTracksResponse[]> {
      return this.makeRequest<FlightTracksResponse[]>('/flight-tracks', params);
    }
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 states the tool returns positional tracks, implying a read-only operation, but doesn't cover critical aspects such as whether it requires authentication, rate limits, data freshness (live vs. historic), error handling, or the format of the returned tracks. This leaves significant gaps in understanding the tool's 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 highly concise and front-loaded, consisting of two sentences that directly state the tool's purpose and a key requirement. There is no wasted language or redundancy, making it efficient for quick comprehension by an AI agent.

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 the complexity of flight tracking and the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'positional tracks' entail (e.g., coordinates, timestamps, altitude), how data is sourced, or potential limitations. For a tool with no structured behavioral or output information, this leaves the agent poorly equipped to use it effectively.

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 description adds minimal value beyond the input schema. It emphasizes that 'flight_id must be provided and non-empty,' which reinforces the schema's 'required' and 'minLength' constraints but doesn't provide additional semantic context. With 100% schema description coverage, the baseline is 3, as the schema already documents the parameter adequately, and the description doesn't compensate with extra insights like examples or usage tips.

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 positional tracks of a specific flight.' It specifies the verb ('Returns') and resource ('positional tracks of a specific flight'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate from siblings like 'get_historic_flights_positions_full' or 'get_live_flights_positions_full', which might also return flight positions but with different scopes or details.

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 that 'flight_id must be provided and non-empty,' but this is a requirement rather than usage context. There's no indication of when this tool is appropriate compared to sibling tools like 'get_flight_summary_full' or position-related tools, leaving the agent without clear selection criteria.

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