Search for flights between cities with prices and schedules
Search for available flights using the mock_api_fetch tool. This provides flight options between any two cities.
Call the mock API with flight parameters:
mock_api_fetch("flights", {
"origin": "NYC",
"destination": "LAX",
"date": "2024-03-15"
})
Use 3-letter airport codes when known (JFK, LAX, LHR, NRT, CDG). For cities without known codes, use the city name and the system will resolve it.
The API returns a list of flight options, each containing:
airline: Carrier name (e.g., "United Airlines")flight_number: Flight identifier (e.g., "UA 123")departure_time: Local departure timearrival_time: Local arrival timeduration: Flight duration in hours and minutesprice: Ticket price in USDstops: Number of stops (0 = direct)When presenting flight results to users, include:
Summary: Number of options found and price range
Flight Details: For each flight, show:
Recommendation: If there's an obvious best value (cheapest direct flight), mention it.
Example format: "Found 3 flights from NYC to LAX on March 15:
The best value is AA 789 at $189, though it has one stop."