get_aircraft_performance
Calculate flight performance estimates for specific aircraft types by providing ICAO code, distance, and altitude to support aviation planning and operations.
Instructions
Get performance estimates for an aircraft type (requires OpenAP).
Args: aircraft_type: ICAO aircraft type code (e.g., 'A320', 'B737') distance_km: Flight distance in kilometers cruise_altitude_ft: Cruise altitude in feet
Returns: JSON string with performance estimates or error message
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| aircraft_type | Yes | ||
| distance_km | Yes | ||
| cruise_altitude_ft | No |
Implementation Reference
- aerospace_mcp/tools/core.py:253-276 (handler)The main handler function implementing the tool logic using OpenAP for aircraft performance estimation.def get_aircraft_performance( aircraft_type: str, distance_km: float, cruise_altitude_ft: float = 35000 ) -> str: """Get performance estimates for an aircraft type (requires OpenAP). Args: aircraft_type: ICAO aircraft type code (e.g., 'A320', 'B737') distance_km: Flight distance in kilometers cruise_altitude_ft: Cruise altitude in feet Returns: JSON string with performance estimates or error message """ if not OPENAP_AVAILABLE: return "OpenAP library is not available. Install with: pip install openap" try: performance = estimates_openap(aircraft_type, distance_km, cruise_altitude_ft) return json.dumps(performance, indent=2) except OpenAPError as e: return f"Performance estimation error: {str(e)}" except Exception as e: return f"Unexpected error: {str(e)}"
- aerospace_mcp/fastmcp_server.py:87-87 (registration)Registration of the get_aircraft_performance tool in the FastMCP server.mcp.tool(get_aircraft_performance)
- aerospace_mcp/fastmcp_server.py:36-42 (registration)Import of the get_aircraft_performance function necessary for registration.from .tools.core import ( calculate_distance, get_aircraft_performance, get_system_status, plan_flight, search_airports, )