Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SERPAPI_API_KEY | No | Your SerpAPI API key for fallback support when primary scraping fails. Get a free key at serpapi.com/users/sign_up (250 searches/month free tier). |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_travel_dates | Calculate suggested travel dates based on current date.
Helpful for planning future trips.
Args:
days_from_now: Number of days from today for departure (default: 30).
trip_length: Length of trip in days (default: 7).
Returns:
JSON with suggested departure and return dates.
Example Args:
{"days_from_now": 45, "trip_length": 10} |
| search_one_way_flights | Fetches available one-way flights for a specific date between two airports.
Can optionally return only the cheapest flight found.
Args:
origin: Origin airport code (e.g., "DEN").
destination: Destination airport code (e.g., "LAX").
date: The specific date to search (YYYY-MM-DD format).
adults: Number of adult passengers (default: 1).
children: Number of children (2-11 years, default: 0).
infants_in_seat: Number of infants in seat (under 2 years, default: 0).
infants_on_lap: Number of infants on lap (under 2 years, default: 0).
seat_type: Fare class - economy/premium_economy/business/first (default: "economy").
return_cheapest_only: If True, returns only the cheapest flight (default: False).
Example Args:
{"origin": "SFO", "destination": "JFK", "date": "2025-07-20"}
{"origin": "SFO", "destination": "JFK", "date": "2025-07-20", "adults": 2, "children": 1}
{"origin": "SFO", "destination": "JFK", "date": "2025-07-20", "return_cheapest_only": true} |
| search_round_trip_flights | Fetches available round-trip flights for specific departure and return dates.
Can optionally return only the cheapest flight found.
💡 TIP: Default max_stops=2 provides more reliable scraping. For direct flights only,
use search_direct_flights() with is_round_trip=True instead.
Args:
origin: Origin airport code (e.g., "DEN").
destination: Destination airport code (e.g., "LAX").
departure_date: The specific departure date (YYYY-MM-DD format).
return_date: The specific return date (YYYY-MM-DD format).
adults: Number of adult passengers (default: 1).
children: Number of children (2-11 years, default: 0).
infants_in_seat: Number of infants in seat (under 2 years, default: 0).
infants_on_lap: Number of infants on lap (under 2 years, default: 0).
seat_type: Fare class - economy/premium_economy/business/first (default: "economy").
max_stops: Maximum number of stops (0=direct, 1=one stop, 2=two stops, default: 2).
Lower values = more reliable scraping. Set higher if needed, but may reduce reliability.
return_cheapest_only: If True, returns only the cheapest flight (default: False).
Example Args:
{"origin": "DEN", "destination": "LAX", "departure_date": "2025-08-01", "return_date": "2025-08-08"}
{"origin": "DEN", "destination": "LAX", "departure_date": "2025-08-01", "return_date": "2025-08-08", "adults": 2, "children": 2}
{"origin": "DEN", "destination": "LAX", "departure_date": "2025-08-01", "return_date": "2025-08-08", "max_stops": 0} |
| search_round_trips_in_date_range | 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} |
| get_multi_city_flights | Fetches multi-city/multi-stop itineraries for complex trip planning.
⚠️ IMPORTANT: Multi-city flight scraping is not fully supported by the underlying fast-flights
library. This function will generate a valid Google Flights URL with your search parameters,
but may not be able to parse the results. If parsing fails, you'll receive a direct link to
view the flights on Google Flights.
💡 RECOMMENDATION FOR AI AGENTS: Instead of using this function, consider using the
get_one_way_flights() function multiple times (once for each leg of the journey) and
combining the results. This approach is more reliable and provides detailed flight
information for each segment, which you can then present together as a complete itinerary.
Args:
flight_segments: JSON string of flight segments. Each segment should have "date", "from", and "to" fields.
Example: '[{"date": "2025-07-01", "from": "SFO", "to": "NYC"}, {"date": "2025-07-05", "from": "NYC", "to": "MIA"}, {"date": "2025-07-10", "from": "MIA", "to": "SFO"}]'
adults: Number of adult passengers (default: 1).
seat_type: Fare class (e.g., "economy", "business", default: "economy").
return_cheapest_only: If True, returns only the cheapest option (default: False).
Example Args:
{"flight_segments": '[{"date": "2025-07-01", "from": "SFO", "to": "NYC"}, {"date": "2025-07-05", "from": "NYC", "to": "MIA"}]'} |
| search_direct_flights | Search for direct flights only (no stops). Supports both one-way and round-trip.
Args:
origin: Origin airport code (e.g., "SFO").
destination: Destination airport code (e.g., "JFK").
date: Departure date (YYYY-MM-DD format).
is_round_trip: If True, search round-trip flights (default: False).
return_date: Return date for round-trips (YYYY-MM-DD format, required if is_round_trip=True).
adults: Number of adult passengers (default: 1).
children: Number of children (2-11 years, default: 0).
infants_in_seat: Number of infants in seat (under 2 years, default: 0).
infants_on_lap: Number of infants on lap (under 2 years, default: 0).
seat_type: Fare class - economy/premium_economy/business/first (default: "economy").
return_cheapest_only: If True, returns only the cheapest flight (default: False).
Example Args:
{"origin": "SFO", "destination": "JFK", "date": "2025-07-20"}
{"origin": "SFO", "destination": "JFK", "date": "2025-07-20", "is_round_trip": true, "return_date": "2025-07-27"} |
| search_flights_by_airline | 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} |
| search_flights_with_max_stops | 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"} |
| generate_google_flights_url | Generate a Google Flights search URL that opens in the browser.
Creates search URLs using natural language queries.
Args:
origin: Origin airport code (e.g., "SFO").
destination: Destination airport code (e.g., "JFK").
departure_date: Departure date (YYYY-MM-DD format).
return_date: Return date for round-trip (YYYY-MM-DD format, optional).
adults: Number of adult passengers (default: 1).
children: Number of children (default: 0).
seat_type: Fare class - economy/premium_economy/business/first (default: "economy").
Returns:
JSON with the Google Flights URL.
Example Args:
{"origin": "SFO", "destination": "JFK", "departure_date": "2025-07-20"}
{"origin": "SFO", "destination": "JFK", "departure_date": "2025-07-20", "return_date": "2025-07-27"} |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| find_best_deal | Comprehensive search strategy to find the absolute cheapest flights. |
| weekend_getaway | Find the best weekend getaway flights (Fri-Sun or Sat-Mon). |
| last_minute_travel | Optimized search for urgent travel needs within the next 2 weeks. |
| business_trip | Optimized flight search for business travel with focus on convenience and flexibility. |
| family_vacation | Plan family-friendly flights with kids. |
| budget_backpacker | Ultra-budget flight search with maximum flexibility. |
| loyalty_program_optimizer | Optimize flights for airline loyalty programs and miles. |
| holiday_peak_travel | Strategic flight search for peak holiday travel periods. |
| long_haul_international | Optimized search for long-haul international flights. |
| stopover_explorer | Find flights with interesting layover cities for mini-adventures. |
| reliable_search_strategy | Guide users on choosing the right fetch mode for reliability and handling scraping issues. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| list_all_airports | List all available airports (first 100 for readability). |