Skip to main content
Glama
HaroldLeo

Google Flights MCP Server

by HaroldLeo

search_round_trips_in_date_range

Find available round-trip flights between specified airports within a flexible date range, with options to filter by stay duration and return only the cheapest options.

Instructions

Finds available round-trip flights within a specified date range.
Can optionally return only the cheapest flight found for each date pair.

⚠️ RATE LIMIT WARNING: This function makes multiple Google Flights scraping requests.
Each date pair combination = 1 request. The function is LIMITED to a MAXIMUM of 30
requests to prevent rate limiting and IP blocking.

Example request counts:
- 7 day range with 5-7 day stays: ~10-15 requests (Safe)
- 14 day range with no limits: ~105 requests (WILL BE REJECTED)
- 30 day range: ~465 requests (WILL BE REJECTED)

💡 TIP: Use min_stay_days and max_stay_days to reduce combinations.
Set return_cheapest_only=true for faster results.

Args:
    origin: Origin airport code (e.g., "DEN").
    destination: Destination airport code (e.g., "LAX").
    start_date_str: Start date of the search range (YYYY-MM-DD format).
    end_date_str: End date of the search range (YYYY-MM-DD format).
    min_stay_days: Minimum number of days for the stay (optional).
    max_stay_days: Maximum number of days for the stay (optional).
    adults: Number of adult passengers (default: 1).
    seat_type: Fare class (e.g., "economy", "business", 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 for each date pair (default: False).
    max_results: Maximum number of results to return (default: 10). Set to 0 or -1 for unlimited.
    offset: Number of results to skip (for pagination, default: 0).
    compact_mode: If True, return only essential fields (saves ~40% tokens, default: False).
    limit: Maximum number of date pairs to process (for pagination, default: 20).

Example Args:
    {"origin": "JFK", "destination": "MIA", "start_date_str": "2025-09-10", "end_date_str": "2025-09-20", "min_stay_days": 5}
    {"origin": "JFK", "destination": "MIA", "start_date_str": "2025-09-10", "end_date_str": "2025-09-20", "min_stay_days": 5, "return_cheapest_only": true}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
originYes
destinationYes
start_date_strYes
end_date_strYes
min_stay_daysNo
max_stay_daysNo
adultsNo
seat_typeNoeconomy
max_stopsNo
return_cheapest_onlyNo
max_resultsNo
offsetNo
limitNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description carries full burden and excels by disclosing critical behavioral traits: rate limits (30 request maximum), scraping methodology (Google Flights), request calculation logic, rejection conditions for excessive ranges, and performance optimization tips. This goes far beyond basic functionality.

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 (purpose, warnings, tips, args, examples) but could be more front-loaded. The rate limit warning with detailed examples is valuable but somewhat lengthy. Every sentence earns its place by adding practical guidance.

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

Completeness5/5

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

For a complex 13-parameter tool with no annotations, the description provides exceptional completeness: purpose, behavioral constraints, parameter semantics, usage examples, and optimization strategies. The presence of an output schema means return values don't need explanation here.

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?

Despite 0% schema description coverage, the description provides comprehensive parameter documentation with examples, format specifications (YYYY-MM-DD), default values, and practical explanations of how parameters interact (e.g., min_stay_days reducing combinations). The example args demonstrate real usage patterns.

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 ('Finds available round-trip flights') and resource ('within a specified date range'), distinguishing it from siblings like 'search_one_way_flights' and 'search_direct_flights' by focusing on round-trips with date range filtering.

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

Usage Guidelines5/5

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

Explicit guidance is provided on when to use this tool vs. alternatives through the rate limit warnings and practical examples showing safe vs. rejected scenarios. The tip about using min_stay_days/max_stay_days and return_cheapest_only provides clear optimization strategies.

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