Skip to main content
Glama
xiaonieli7

Flight Ticket MCP Server

by xiaonieli7

getFlightsInArea

Query all flights within a specified geographic area using boundary box coordinates to identify available air traffic and travel options.

Instructions

区域航班查询 - 查询指定地理区域内的所有航班。参数为边界框坐标(最小纬度,最大纬度,最小经度,最大经度)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_latYes
max_lonYes
min_latYes
min_lonYes

Implementation Reference

  • Core handler function that constructs a bounding box from input coordinates and delegates to SimpleOpenSkyTracker.get_all_states() to fetch real-time flight data from OpenSky Network API.
    def getFlightsInArea(min_lat: float, max_lat: float, min_lon: float, max_lon: float) -> Dict[str, Any]:
        """
        查询指定地理区域内的所有航班
        
        Args:
            min_lat: 最小纬度
            max_lat: 最大纬度
            min_lon: 最小经度 
            max_lon: 最大经度
            
        Returns:
            包含区域内航班列表的字典
        """
        bbox = (min_lat, max_lat, min_lon, max_lon)
        return simple_tracker.get_all_states(bbox)
  • Registration of the MCP tool using FastMCP @mcp.tool() decorator. The function signature and docstring define the tool schema, and it delegates execution to the core handler in simple_opensky_tools.py.
    @mcp.tool()
    def getFlightsInArea(min_lat: float, max_lat: float, min_lon: float, max_lon: float):
        """区域航班查询 - 查询指定地理区域内的所有航班。参数为边界框坐标(最小纬度,最大纬度,最小经度,最大经度)"""
        logger.debug(f"调用区域航班查询工具: bbox=({min_lat}, {max_lat}, {min_lon}, {max_lon})")
        return simple_opensky_tools.getFlightsInArea(min_lat, max_lat, min_lon, max_lon)
Behavior2/5

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

With no annotations provided, the description carries full burden but provides minimal behavioral context. It states it's a query operation (implied read-only) and mentions bounding box coordinates, but doesn't disclose rate limits, authentication needs, response format, pagination, or what happens with invalid coordinates. For a tool with 4 parameters and no annotations, 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?

Two concise sentences with zero waste. The first sentence states purpose, the second explains parameters. It's appropriately sized and front-loaded with the core functionality. No redundant or verbose language.

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?

For a tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It covers basic purpose and parameter types but lacks critical details like return format, error conditions, coordinate system, and usage context. The agent would struggle to use this effectively without trial-and-error.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It mentions parameters are bounding box coordinates (最小纬度,最大纬度,最小经度,最大经度) which adds meaning beyond the schema's generic number types, but doesn't explain coordinate systems (e.g., WGS84), valid ranges, or ordering requirements. With 4 undocumented parameters, this partial information is inadequate.

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 verb ('查询' - query) and resource ('航班' - flights) with specific scope ('指定地理区域内' - within a specified geographic area). It distinguishes from siblings like getFlightInfo (specific flight) or getAirportFlights (airport-based), but doesn't explicitly name alternatives. The purpose is unambiguous but lacks explicit sibling differentiation.

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?

No guidance on when to use this tool versus alternatives. The description mentions the parameter format but doesn't indicate scenarios where this tool is preferred over siblings like searchFlightRoutes or getAirportFlights. There's no mention of prerequisites, limitations, or typical use cases.

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/xiaonieli7/FlightTicketMCP'

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