flight_branded_fare
ChatGPTFetch branded fare options (fare rules, baggage allowance, refund & change penalties, seat / meal policy, mandatory documents) for a selected flight. Call this when the user clicks 'See fare details' on a flight search result. Required inputs: sessionId (the sid returned by flight_search) and flightIndex (the selected flight's id/fii/key). The response is a simplified wrapper: { token, fare_options: [{FareKey, FareName, Total, Airfare{adult,child,infant}, Currency, ClassOfService, SeatPolicy, MealPolicy, BaggageAllowance, IsRefundable, FareRule{Refund,Change,NoShow}, MandatoryDocuments, Legs:[{LegIndex, FsgId, FrId, FareName, SeatPolicy, MealPolicy, BaggageAllowance, FareRule}]}]}. For roundtrip fares, Legs[0] is the departure segment and Legs[1] is the return segment; each fare_options entry is one priced departure+return fare combination — its FrId sequence (Legs[].FrId) identifies which combination it is.
hotel_details
ChatGPTFetch hotel details for a specific hotelId. (Language is fixed to EN for now.)
package_session_details
ChatGPTFetch full hybrid package session JSON (flights, hotels, pricing) for a known package_session_id and org_id. Intended for the package results widget after search_dynamic_package; call only when both ids are already known.
search_dynamic_package
ChatGPTSearch dynamic holiday package options. Supports flight + hotel + transfer + activities in one request. The server runs multiple upstream searches by default (AirlineAPI-style) unless you pass variants: 1 or provide an explicit requests array. Use this tool when user asks for trip packages, vacations, honeymoon/family trips, multi-day stays (e.g. '7 days beach vacation'), or location + activities together (e.g. 'Dubai beaches and activities', 'Goa water sports package', 'Mumbai sightseeing package'). If intent includes vacation/package words or both location + activities, prefer this tool instead of search_hotel. Every call should include origin context: from_origin_latitude, from_origin_longitude, and from_origin_city (use client userLocation when available). from_airport is optional when origin coordinates are present; server resolves nearest departure IATA automatically. There is no hardcoded default origin airport. Make exactly ONE tool call per user message with every detail you already know. Do NOT call twice (e.g. a probe call then a second call with dates) — ChatGPT shows duplicate package skeleton cards. TravelPackageReqObj Details TravelPackageReqObj JSON Schema (all 5 origin fields REQUIRED on every call): ```json [ { "location": "DestinationCity", "from_origin_city": "UserOrExplicitCity", "from_airport": "ABC", "from_origin_latitude": 51.8573, "from_origin_longitude": 3.9439, "from_country": "XY", "departure_date": "DD MMM YYYY", "nights": 4, "activities": ["beach", "sightseeing"], "rooms": [ { "adult_count": 1, "child_count": 0, "child_age": [] } ], "destinations": [ { "city_name": "DestinationCity", "checkin_date": "DD MMM YYYY", "checkout_date": "DD MMM YYYY" } ], "star_rating": "3,4,5", "is_transfer": false, "is_activity": true, "package_title": "Generated Title" } ] ``` 🚨 ORIGIN POLICY — You resolve airports, not the server. On EVERY call you MUST supply all 5 origin fields. The server does NOT resolve city names into airport IATA codes — you must do this before calling the tool, exactly like the flight search tool. Step 1 — Decide the source. Read the USER's prompt: - If the user explicitly names a departure city or airport ("from Mumbai", "flying out of LHR", "depart from Tokyo", "out of BOM") → SOURCE A: derive all 5 origin fields from that city/airport. Ignore `_meta.openai/userLocation`. - Otherwise (user said nothing about departure) → SOURCE B: read `_meta.openai/userLocation` and derive all 5 origin fields from that. Step 2 — Fill in all 5 fields (YOU must resolve city → IATA): For SOURCE A (user-explicit origin, e.g. user said "from Mumbai"): - `from_origin_city` = the user's named city ("Mumbai") - `from_airport` = the 3-letter IATA airport code ("BOM") — YOU must resolve this using your own knowledge - `from_origin_latitude` = the city's decimal degrees latitude (19.0760) if known, otherwise omit - `from_origin_longitude` = the city's decimal degrees longitude (72.8777) if known, otherwise omit - `from_country` = the 2-letter ISO country code ("IN") if known, otherwise omit For SOURCE B (no explicit origin → use userLocation): - `from_origin_city` = `_meta.openai/userLocation.city` verbatim - `from_origin_latitude` = `_meta.openai/userLocation.latitude` verbatim - `from_origin_longitude` = `_meta.openai/userLocation.longitude` verbatim - `from_country` = `_meta.openai/userLocation.country` verbatim - `from_airport` = the 3-letter IATA code for the nearest major airport to that city — YOU must resolve this using your own knowledge Step 3 — NEVER ask the user. Don't say "Where are you flying from?" or "What's your departure airport?". Always pick a source above and supply the fields. Destination resolution: - Pass the destination city name in `location` / `destinations[0].city_name`. - The server resolves the destination city code via the hotel search-form API. - If the user gives a vacation type without a place (e.g. "beach vacation", "honeymoon package"), infer a suitable destination. WORKED EXAMPLE A (explicit origin)* — user prompt:…
search_flight
ChatGPTSearch flight options (one-way or roundtrip). Make exactly ONE tool call per user turn. Include every detail the user already gave (origin, destination, dates, return date, passengers, cabin, airline filters, direct-only, time-of-day) in that call. If the user only gives origin and destination (no travel date), still call once with origin+destination — the server defaults departure to about 7 days ahead. Do not refuse to search solely because a date was omitted. Avoid chaining two searches for the same trip in one turn (that can duplicate 'Flights found' cards); a single call with whatever fields are known is correct. ROUNDTRIP: if the user mentions a return/coming-back date in ANY form ('and return on 29 September', 'returning 29th', 'back on the 29th', 'round trip', '23-29 Sep'), you MUST include returnDate in the SAME first call. Never issue a one-way search first and a roundtrip search afterwards — the user sees a one-way listing replaced by a roundtrip one. Pass returnDate (server builds the return itinerary), or a full TravelSwitch request with tripType='2' and two itineraries. If the user wants only non-stop/direct flights, set isDirect=true. Set sortBy=CHEAPEST when the user asks for the cheapest/lowest fare, FASTEST for quickest/shortest; otherwise omit it (the server defaults to MIX). If the user asks for a specific airline in natural language (e.g. 'Flynas flights', 'flights of Flynas', 'only Flynas', 'Flynas only'), pass airline='Flynas' (or airlineCode='XY') so the upstream API filters results. If the user wants only non-stop/direct flights (no layovers), set isDirectFlight=true. Open-ended searches still surface a cheapest non-stop in the result set when the API returns any. If the user requests time-of-day filtering in natural language, you MUST pass the matching filter fields so the MCP server filters the results after the upstream API returns. Map common phrases like: 'early morning' -> timeOfDay='early_morning' (00:00-08:00), 'morning' -> timeOfDay='morning' (06:00-12:00), 'afternoon' -> timeOfDay='afternoon' (12:00-18:00), 'evening'/'night' -> timeOfDay='evening' (18:00-24:00). For custom windows, use preferredDepartureTime='HH:MM-HH:MM' or departureTimeFrom/departureTimeTo. If the user asks for total duration constraints like 'under 6 hours' or 'under 9 hours 30 minutes', pass maxTotalDurationHours=6 or maxTotalDurationMinutes=570 (or maxTotalDuration='09:30'). IMPORTANT: origin and destination must always be valid 3-letter IATA airport codes, not city names, airport names, or free text. The assistant must resolve city names or airport names into airport codes BEFORE calling this tool. Do not call this tool if either value is not a confident 3-letter airport code. If the user provides an explicit 3-letter code (e.g., 'bom to del', 'blr to dxb'), preserve it exactly after uppercasing. Never override or reinterpret explicit codes. If the user provides a city name, infer the primary commercial airport code for that city. If the user provides an airport name, infer the exact IATA code for that airport. If the user provides mixed values (e.g., 'Mumbai to DXB'), preserve explicit codes and infer only the missing side. If you cannot confidently determine the airport code, do not call the tool; ask the user for clarification instead. Examples: 'Mumbai to Delhi' -> origin='BOM' destination='DEL'; 'Heathrow to Dubai' -> origin='LHR' destination='DXB'; 'BOM to DXB' -> origin='BOM' destination='DXB'; 'Mumbai to DXB' -> origin='BOM' destination='DXB'.
search_hotel
ChatGPTSearch hotel availability and rates. USE THIS TOOL when the user asks for hotels, accommodation, places to stay, or room bookings — even simple queries like 'hotels in Dubai', 'show me hotels', 'best hotels in Mumbai', or 'cheap stays in London'. IMPORTANT: Make exactly ONE tool call per user request. Include EVERY detail the user mentioned in the SAME call. Do NOT use this tool for package/vacation planning intents (e.g. '7 days vacation', 'beach vacation', 'Dubai with activities', 'Goa honeymoon package'). For those, use search_dynamic_package. If the user did NOT provide dates or guest counts, DO NOT ask follow-up questions — call the tool anyway (the server defaults dates and adults/rooms). EXCEPTION: if children/infants are present but ages are missing, ask a follow-up for child ages (<=11) and infant ages (<=2) before calling. Do NOT make a quick call and then a second call with dates — that creates duplicate cards in the chat. When the user asks for stars, follow this mapping strictly: (a) plain '4 star hotels' means EXACT 4★ only (set both minStarRating=4 and maxStarRating=4, or ratings='4'); (b) words like 'above', 'greater than', 'minimum', 'min', 'at least' mean LOWER-BOUND (e.g. above 3★ => 4★+); (c) words like 'maximum', 'max', 'up to', 'at most' mean UPPER-BOUND (e.g. max 3★ => 1★..3★). The server maps these to upstream ratings CSV (e.g. '4', '4,5', '1,2,3'). For budget filters like 'under $180 per night', set maxPrice to 180 and set pricePerNight to true (and set currency if the user mentions one).