Skip to main content
Glama
HaroldLeo

Google Flights MCP Server

by HaroldLeo

search_flights_with_max_stops

Find flights between airports with control over layovers by specifying maximum stops (0 for direct, 1 for one stop, or 2 for two stops). Supports round-trip searches, passenger counts, and fare classes.

Instructions

Search flights with a maximum number of stops (0=direct, 1=one stop, 2=two stops).

Args:
    origin: Origin airport code (e.g., "SFO").
    destination: Destination airport code (e.g., "JFK").
    date: Departure date (YYYY-MM-DD format).
    max_stops: Maximum number of stops (0, 1, or 2).
    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").
    return_cheapest_only: If True, returns only the cheapest flight (default: False).

Example Args:
    {"origin": "SFO", "destination": "JFK", "date": "2025-07-20", "max_stops": 1}
    {"origin": "SFO", "destination": "JFK", "date": "2025-07-20", "max_stops": 0, "is_round_trip": true, "return_date": "2025-07-27"}

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 lacks critical behavioral details. It doesn't mention whether this is a read-only operation, what authentication is required, rate limits, pagination behavior (though max_results parameter exists), or what happens when no flights match criteria.

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?

Well-structured with clear sections (description, args list, examples). The description is front-loaded with the core purpose. Some redundancy exists (e.g., 'Args:' section repeats what's in the schema), but overall efficient for an 11-parameter tool.

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's complexity (11 parameters, no annotations) and the presence of an output schema, the description is partially complete. It excels at parameter documentation but lacks behavioral context and usage guidance. The output schema existence reduces the need to describe return values, but other gaps remain significant.

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?

The description provides excellent parameter semantics beyond the schema. It explains max_stops values (0=direct, 1=one stop, 2=two stops), provides format examples for dates and airport codes, clarifies defaults for multiple parameters, and includes example arguments. This fully compensates for the 0% schema description coverage.

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 tool searches flights with a maximum stop constraint, distinguishing it from siblings like search_direct_flights or search_round_trip_flights. However, it doesn't explicitly differentiate from search_one_way_flights or search_flights_by_airline, which may also support stop limits.

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 like search_direct_flights or search_round_trip_flights. The description mentions max_stops parameter but doesn't provide context for choosing between this and sibling tools with similar functionality.

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