Skip to main content
Glama
HaroldLeo

Google Flights MCP Server

by HaroldLeo

search_flights_by_airline

Find flights filtered by specific airlines or alliances. Enter origin, destination, date, and preferred carriers to search for available options.

Instructions

Search flights filtered by specific airlines or alliances.

💡 TIP: Default max_stops=2 provides more reliable scraping for round-trip searches.

Args:
    origin: Origin airport code (e.g., "SFO").
    destination: Destination airport code (e.g., "JFK").
    date: Departure date (YYYY-MM-DD format).
    airlines: Airline code(s) or alliance name. Can be either:
             - Single airline: "UA" or "AA" or "DL" (2-letter codes)
             - Multiple airlines: ["UA", "AA", "DL"] (JSON array)
             - Alliance: "STAR_ALLIANCE" or "SKYTEAM" or "ONEWORLD"
    is_round_trip: If True, search round-trip flights (default: False).
    return_date: Return date for round-trips (YYYY-MM-DD format).
    adults: Number of adult passengers (default: 1).
    seat_type: Fare class (default: "economy").
    max_stops: Maximum number of stops (0=direct, 1=one stop, 2=two stops, default: 2).
    return_cheapest_only: If True, returns only the cheapest flight (default: False).

Example Args:
    {"origin": "SFO", "destination": "TYO", "date": "2026-02-20", "airlines": "UA"}
    {"origin": "SFO", "destination": "JFK", "date": "2025-07-20", "airlines": "["UA", "AA"]"}
    {"origin": "SFO", "destination": "JFK", "date": "2025-07-20", "airlines": "STAR_ALLIANCE", "max_stops": 0}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYes
destinationYes
dateYes
airlinesYes
is_round_tripNo
return_dateNo
adultsNo
seat_typeNoeconomy
max_stopsNo
return_cheapest_onlyNo
max_resultsNo
compact_modeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It adds valuable context beyond basic functionality: the scraping reliability tip, default behaviors (max_stops=2, return_cheapest_only=False), and format examples. It doesn't mention rate limits, authentication needs, or error handling, but provides substantial operational guidance.

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?

The description is well-structured with purpose statement, tip, parameter explanations, and examples. Every sentence earns its place by adding value. It could be slightly more front-loaded by moving the examples to the end, but overall it's efficiently organized without wasted content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (12 parameters, 0% schema coverage) and presence of an output schema, the description provides substantial context. It thoroughly documents parameters and usage patterns. The main gap is lack of explicit guidance on when to choose this tool versus sibling alternatives, but otherwise it's quite complete for a search tool.

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?

With 0% schema description coverage, the description fully compensates by providing detailed parameter explanations. It clarifies the 'airlines' parameter's three possible formats (single code, array, alliance name), explains defaults for 5 parameters, provides format requirements (YYYY-MM-DD), and gives concrete examples. This adds significant meaning 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 tool's purpose as 'Search flights filtered by specific airlines or alliances,' which is a specific verb+resource combination. It distinguishes itself from siblings like 'search_direct_flights' or 'search_round_trip_flights' by emphasizing airline/alliance filtering as the primary differentiator.

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?

The description provides clear context for usage through the tip about max_stops=2 for reliable round-trip scraping and the examples showing different airline filtering scenarios. However, it doesn't explicitly state when to use this tool versus alternatives like 'search_direct_flights' or 'search_round_trip_flights' from the sibling list.

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/HaroldLeo/google-flights-mcp'

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