Skip to main content
Glama
xiaonieli7

Flight Ticket MCP Server

by xiaonieli7

getFlightStatus

Query real-time flight status and position using OpenSky Network data. Provide flight number (e.g., CCA1234) to get current location and operational status.

Instructions

航班实时状态查询 - 使用OpenSky Network查询航班实时位置和状态。flight_number为航班呼号(如CCA1234),date参数无效(仅支持实时数据)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNo
flight_numberYes

Implementation Reference

  • MCP tool handler and registration for 'getFlightStatus'. Decorated with @mcp.tool(), includes input schema via type hints and docstring, logs invocation, and delegates to core helper implementation.
    def getFlightStatus(flight_number: str, date: str = None):
        """航班实时状态查询 - 使用OpenSky Network查询航班实时位置和状态。flight_number为航班呼号(如CCA1234),date参数无效(仅支持实时数据)"""
        logger.debug(f"调用航班实时状态查询工具: flight_number={flight_number}, date={date}")
        return simple_opensky_tools.getFlightStatus(flight_number, date)
  • Core helper function implementing the getFlightStatus logic. Ignores date parameter (real-time only), queries OpenSky Network via SimpleOpenSkyTracker.search_flights_by_callsign.
    def getFlightStatus(flight_number: str, date: str = None) -> Dict[str, Any]:
        """
        查询航班实时状态(使用OpenSky Network REST API)
        
        Args:
            flight_number: 航班号/呼号 (如: "CCA1234", "CSN5678")
            date: 日期参数(OpenSky仅支持实时数据,此参数被忽略)
            
        Returns:
            包含航班状态信息的字典
        """
        if date:
            logger.info("OpenSky仅支持实时数据,忽略date参数")
        
        return simple_tracker.search_flights_by_callsign(flight_number)
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that it only supports real-time data (date parameter is ineffective), which is a key behavioral trait. However, it lacks details on rate limits, error handling, or response format, leaving gaps in transparency for an API-based query tool.

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 front-loaded with the core purpose, followed by specific parameter guidance in a single, efficient sentence. Every part adds value without redundancy, making it appropriately sized for the tool's complexity.

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 has no annotations, no output schema, and low schema coverage, the description is moderately complete. It covers the real-time constraint and parameter semantics well, but for a query tool, it should ideally mention the type of data returned (e.g., position, altitude, speed) or potential limitations, leaving room for improvement.

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

Parameters5/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 adds crucial meaning: it explains that 'flight_number' is the flight call sign (e.g., CCA1234) and that 'date' is ineffective since only real-time data is supported. This clarifies parameter usage beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('查询' meaning 'query' or 'retrieve') and resource ('航班实时状态' meaning 'flight real-time status'), and distinguishes it from siblings by specifying it uses OpenSky Network for real-time position and status, unlike other tools that might handle historical data or different queries.

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

Usage Guidelines4/5

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

It provides clear context on when to use this tool: for real-time flight status queries using OpenSky Network, with a flight number as the key input. It implicitly distinguishes from siblings by focusing on single-flight real-time data, but does not explicitly name alternatives or state when not to use it.

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