A production-grade Python MCP server for flight search and analysis
Three tools with complete input schemas and descriptions. search_flights has comprehensive parameter documentation (10 params, all typed and described); get_cache_stats and clear_cache are minimal but functional. Descriptions are adequate (50-150 chars) but lack LLM-optimized guidance on when/why to use each tool. No output schemas documented. No error handling guidance. No tool annotations (readOnlyHint/destructiveHint). Parameter descriptions include format hints (IATA codes, YYYY-MM-DD) which is good, but lack constraint ranges for numeric fields (adults 1-9, children 0-8, infants 0-4 are mentioned in descriptions but not enforced as schema constraints). Missing idempotency guidance for cache operations.
Clear all cached flight search results. This removes all cached search results, forcing fresh API calls for subsequent searches.
Get flight search cache statistics. Returns cache size, hit/miss counts, and hit rate percentage.
Search for flights between airports.
Output schemas not documented. LLMs cannot plan downstream operations or extract required fields from search_flights results (e.g., booking_url, price, departure_time structure unknown).
Numeric parameter constraints (adults 1-9, children 0-8, infants 0-4, max_stops 0-5) are mentioned in descriptions but not enforced in JSON Schema. LLMs may pass invalid values; validation happens at runtime only.
No tool annotations (readOnlyHint, destructiveHint). clear_cache is a WRITE operation but lacks destructiveHint annotation. Agents cannot distinguish safe vs. risky tools without reading descriptions.
No error handling guidance. If search_flights fails (invalid airport code, API timeout, no results), the tool returns a string but does not guide the LLM on recovery (e.g., 'Try search_airports() to validate codes').
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 55 | <=2025-11-25 | v2 |
cabin_class parameter accepts free-form string ('economy', 'premium_economy', 'business', 'first') but is not declared as an enum. LLMs may hallucinate invalid values like 'first_class' or 'economy_plus'.