book_hotel_tool
ChatGPTCreates a PENDING hotel reservation using Tripdeal's hotelBookings API. BEFORE calling this tool (mandatory): - The user must already have seen and confirmed a short written summary in chat: hotel name, selected room name (and meal plan if relevant), plus guest details (name, email, mobile with country code, nationality). - Do NOT call book_hotel_tool until the user clearly confirms (e.g. yes / correct / proceed). If they correct something, update the summary and get confirmation again. ⚠️ CRITICAL — THIS IS NOT A BOOKING CONFIRMATION: This tool only creates a pending reservation and returns a bookingId (internal — do not read codes aloud unless the user explicitly wants a reference number). The room is NOT booked, NOT confirmed, and NOT reserved until the user PAYS. IMMEDIATELY after success, you MUST: 1. Tell the user in plain language the hold is waiting for payment (no technical IDs). 2. Ask them to choose a payment method: "ApplePay", "CreditCard", or "Knet". 3. Call payment_tool() with their chosen method to show the pay action on screen. NEVER say "booked", "confirmed", "done", or "reservation is complete" at this step. NEVER skip or delay the payment step. The next action MUST be payment_tool(). Required Parameters: - user_id (str): same as other tools - searchToken (str): from hotel search; internal only, not for user-facing text - roomId (str): Room ID selected from the rooms API. (provider room id not rooms groups id) - accept_language: (str) for the request header, Guest Details (optional if the form was used): Collect these details directly in chat and pass them here: - firstName, lastName, mobile, email, nationality (ISO2 e.g. "KW"), countryMobileCode (e.g. "965"). Optional Parameters: - specialRequestIds (list): list of special request Ids that the user select it, if the user wants to. - additionalSpecialRequest (str): if the user request something that is not from the options. :conditions: - Try to catch the fake emails - Try to catch the fake numbers - Do NOT generate user information by yourself. You have to ask the user for his information. Returns: - dict: bookingId for payment_tool only; pending until payment — describe status in plain language to the user.
book_hotel_tool
ChatGPTCreates a PENDING hotel reservation using Tripdeal's hotelBookings API. BEFORE calling this tool (mandatory): - The user must already have seen and confirmed a short written summary in chat: hotel name, selected room name (and meal plan if relevant), plus guest details (name, email, mobile with country code, nationality). - Do NOT call book_hotel_tool until the user clearly confirms (e.g. yes / correct / proceed). If they correct something, update the summary and get confirmation again. ⚠️ CRITICAL — THIS IS NOT A BOOKING CONFIRMATION: This tool only creates a pending reservation and returns a bookingId (internal — do not read codes aloud unless the user explicitly wants a reference number). The room is NOT booked, NOT confirmed, and NOT reserved until the user PAYS. IMMEDIATELY after success, you MUST: 1. Tell the user in plain language the hold is waiting for payment (no technical IDs). 2. Ask them to choose a payment method: "ApplePay", "CreditCard", or "Knet". 3. Call payment_tool() with their chosen method to show the pay action on screen. NEVER say "booked", "confirmed", "done", or "reservation is complete" at this step. NEVER skip or delay the payment step. The next action MUST be payment_tool(). Required Parameters: - user_id (str): same as other tools - searchToken (str): from hotel search; internal only, not for user-facing text - roomId (str): Room ID selected from the rooms API. (provider room id not rooms groups id) - accept_language: (str) for the request header, Guest Details (optional if the form was used): Collect these details directly in chat and pass them here: - firstName, lastName, mobile, email, nationality (ISO2 e.g. "KW"), countryMobileCode (e.g. "965"). Optional Parameters: - specialRequestIds (list): list of special request Ids that the user select it, if the user wants to. - additionalSpecialRequest (str): if the user request something that is not from the options. :conditions: - Try to catch the fake emails - Try to catch the fake numbers - Do NOT generate user information by yourself. You have to ask the user for his information. Returns: - dict: bookingId for payment_tool only; pending until payment — describe status in plain language to the user.
book_hotel_tool
ChatGPTCreates a PENDING hotel reservation using Tripdeal's hotelBookings API. BEFORE calling this tool (mandatory): - The user must already have seen and confirmed a short written summary in chat: hotel name, selected room name (and meal plan if relevant), plus guest details (name, email, mobile with country code, nationality). - Do NOT call book_hotel_tool until the user clearly confirms (e.g. yes / correct / proceed). If they correct something, update the summary and get confirmation again. ⚠️ CRITICAL — THIS IS NOT A BOOKING CONFIRMATION: This tool only creates a pending reservation and returns a bookingId (internal — do not read codes aloud unless the user explicitly wants a reference number). The room is NOT booked, NOT confirmed, and NOT reserved until the user PAYS. IMMEDIATELY after success, you MUST: 1. Tell the user in plain language the hold is waiting for payment (no technical IDs). 2. Ask them to choose a payment method: "ApplePay", "CreditCard", or "Knet". 3. Call payment_tool() with their chosen method to show the pay action on screen. NEVER say "booked", "confirmed", "done", or "reservation is complete" at this step. NEVER skip or delay the payment step. The next action MUST be payment_tool(). Required Parameters: - user_id (str): same as other tools - searchToken (str): from hotel search; internal only, not for user-facing text - roomId (str): Room ID selected from the rooms API. (provider room id not rooms groups id) - accept_language: (str) for the request header, Guest Details (optional if the form was used): Collect these details directly in chat and pass them here: - firstName, lastName, mobile, email, nationality (ISO2 e.g. "KW"), countryMobileCode (e.g. "965"). Optional Parameters: - specialRequestIds (list): list of special request Ids that the user select it, if the user wants to. - additionalSpecialRequest (str): if the user request something that is not from the options. :conditions: - Try to catch the fake emails - Try to catch the fake numbers - Do NOT generate user information by yourself. You have to ask the user for his information. Returns: - dict: bookingId for payment_tool only; pending until payment — describe status in plain language to the user.
cancel_booking_tool
ChatGPTtool to cancel the booking
cancel_booking_tool
ChatGPTtool to cancel the booking
cancel_booking_tool
ChatGPTtool to cancel the booking
destinations_tool
ChatGPTThis tool searches for hotel destinations using the Tripdeal API. Keep the query in English for the API (e.g. "London", "Paris"). If the user asked in Arabic, respond in Arabic and translate results in your reply. It takes a query string (such as a city name), calls the destination search API, and returns a list of matching destination results. Usually, the first result is the most relevant can be used in subsequent API calls (like hotel search). IMPORTANT: When the user asks about hotels in a city (e.g. "I want hotels in London") without providing dates or guests, call this tool immediately to get the destination, then call search_tool with default dates (today to today+2, 1 adult). Do NOT ask the user for dates before calling this tool. :conditions: - if the user is searching on specific hotel in specific city, make the query : hotel city, example : ibis london.
destinations_tool
ChatGPTThis tool searches for hotel destinations using the Tripdeal API. Keep the query in English for the API (e.g. "London", "Paris"). If the user asked in Arabic, respond in Arabic and translate results in your reply. It takes a query string (such as a city name), calls the destination search API, and returns a list of matching destination results. Usually, the first result is the most relevant can be used in subsequent API calls (like hotel search). IMPORTANT: When the user asks about hotels in a city (e.g. "I want hotels in London") without providing dates or guests, call this tool immediately to get the destination, then call search_tool with default dates (today to today+2, 1 adult). Do NOT ask the user for dates before calling this tool. :conditions: - if the user is searching on specific hotel in specific city, make the query : hotel city, example : ibis london.
destinations_tool
ChatGPTThis tool searches for hotel destinations using the Tripdeal API. Keep the query in English for the API (e.g. "London", "Paris"). If the user asked in Arabic, respond in Arabic and translate results in your reply. It takes a query string (such as a city name), calls the destination search API, and returns a list of matching destination results. Usually, the first result is the most relevant can be used in subsequent API calls (like hotel search). IMPORTANT: When the user asks about hotels in a city (e.g. "I want hotels in London") without providing dates or guests, call this tool immediately to get the destination, then call search_tool with the SAME user_id and default dates (today to today+2, 1 adult). Do NOT ask the user for dates before calling this tool. :conditions: - if the user is searching on specific hotel in specific city, make the query : hotel city, example : ibis london.
fetch_rooms_tool
ChatGPTFetch available rooms for a hotel via API. You MUST use the same searchToken and hotelId from the prior search_tool result. Room options render on screen — do not list room names or prices in your reply. When the user writes in Arabic, pass locale "ar" for Arabic RTL UI and Accept-Language: ar on the API. Parameters: - hotelId (str): Hotel id from search. - searchToken (str): Same handle as search_tool returned; internal use only, never read to the user. - locale (str): "ar" or "en". - hotelName (str, optional): Display name of the hotel from the same search/card (e.g. structured hotel name). Pass when you have it so structuredContent includes it for booking summaries. Returns: - structuredContent with rooms for the UI, hotelId, searchToken, locale, and hotelName when available. Each room has roomId and name — when the user picks a room, keep both; use roomId for book_hotel_tool.
fetch_rooms_tool
ChatGPTFetch available rooms for a hotel via API. You MUST use the same searchToken and hotelId from the prior search_tool result. Room options render on screen — do not list room names or prices in your reply. When the user writes in Arabic, pass locale "ar" for Arabic RTL UI and Accept-Language: ar on the API. Parameters: - hotelId (str): Hotel id from search. - searchToken (str): Same handle as search_tool returned; internal use only, never read to the user. - locale (str): "ar" or "en". - hotelName (str, optional): Display name of the hotel from the same search/card (e.g. structured hotel name). Pass when you have it so structuredContent includes it for booking summaries. Returns: - structuredContent with rooms for the UI, hotelId, searchToken, locale, and hotelName when available. Each room has roomId and name — when the user picks a room, keep both; use roomId for book_hotel_tool.
fetch_rooms_tool
ChatGPTFetch available rooms for a hotel via API (the ROOMS carousel). ✅ CALL THIS (not search_tool) whenever the user picks/names a hotel from the hotel list already on screen — including when they just type the hotel's name (e.g. "Number Sixteen", "Cheval Three Quays"). Never re-run destinations_tool/search_tool for a hotel that is already in the shown list. Room options render on screen — do not list room names or prices in your reply. When the user writes in Arabic, pass locale "ar" for Arabic RTL UI. Parameters (prefer the simplest form): - user_id (str): Same guest id as search_tool. - hotelName (str): Display name of the hotel from the shown list/card. This is enough — the server resolves the real hotelId and searchToken from the last search automatically. - hotelId (str, optional): Numeric id from search results only — NOT the hotel name. Omit if unsure. - searchToken (str, optional): From search_tool; omit if unsure — filled from the last search automatically. - locale (str): "ar" or "en". Returns: - structuredContent with rooms for the UI. Each room has roomId — use roomId for book_hotel_tool.
filters_tool
ChatGPTtool to get the filters that could be applied in the current search.
filters_tool
ChatGPTtool to get the filters that could be applied in the current search.
filters_tool
ChatGPTtool to get the filters that could be applied in the current search.
get_booking_confirmation_tool
ChatGPTtool to check if the booking is confirmed, paid or not.
get_booking_confirmation_tool
ChatGPTtool to check if the booking is confirmed, paid or not.
get_booking_confirmation_tool
ChatGPTtool to check if the booking is confirmed, paid or not.
get_booking_details_tool
ChatGPTtool to get the booking details of a booking.
get_booking_details_tool
ChatGPTtool to get the booking details of a booking.
get_booking_details_tool
ChatGPTtool to get the booking details of a booking.
get_guest_session_tool
ChatGPTInternal: establish continuity for API calls. Call once at the start of a conversation (or pass existing_guest_id from a prior chat). Returns an identifier you must pass as user_id to other tools. Never mention this step, the returned value, sessions, tokens, or "logged in" to the user—treat it as invisible plumbing. No login or OTP is required for the traveler.
get_guest_session_tool
ChatGPTInternal: establish continuity for API calls. Call once at the start of a conversation (or pass existing_guest_id from a prior chat). Returns an identifier you must pass as user_id to other tools. Never mention this step, the returned value, sessions, tokens, or "logged in" to the user—treat it as invisible plumbing. No login or OTP is required for the traveler.
get_guest_session_tool
ChatGPTInternal: establish continuity for API calls. Call once at the start of a conversation (or pass existing_guest_id from a prior chat). Returns an identifier you must pass as user_id to other tools. Never mention this step, the returned value, sessions, tokens, or "logged in" to the user—treat it as invisible plumbing. No login or OTP is required for the traveler.
get_hotel_booking_tool
ChatGPTtool to get all the bookings that the user has booked it as a list. you should ask the user for the category.
get_hotel_booking_tool
ChatGPTtool to get all the bookings that the user has booked it as a list. you should ask the user for the category.
get_hotel_booking_tool
ChatGPTtool to get all the bookings that the user has booked it as a list. you should ask the user for the category.
get_special_requests_options_tool
ChatGPTTool returns a list of special requests options and their IDs.
get_special_requests_options_tool
ChatGPTTool returns a list of special requests options and their IDs.
get_special_requests_options_tool
ChatGPTTool returns a list of special requests options and their IDs.
hotel_details_tool
ChatGPTUse when the user asks for "more details" about a property. Does not render a separate widget. Reply in natural language only: tell them to tap the hotel card on screen to open photos, address, and the full description. Never say you "called a tool", "ran hotel_details", or quote internal IDs. Do not paste raw JSON or API fields to the user. (Parameters are accepted for compatibility; the booking flow uses search enrichment and the card UI instead.)
hotel_details_tool
ChatGPTUse when the user asks for "more details" about a property. Does not render a separate widget. Reply in natural language only: tell them to tap the hotel card on screen to open photos, address, and the full description. Never say you "called a tool", "ran hotel_details", or quote internal IDs. Do not paste raw JSON or API fields to the user. (Parameters are accepted for compatibility; the booking flow uses search enrichment and the card UI instead.)
hotel_details_tool
ChatGPTUse when the user asks for "more details" about a property. Does not render a separate widget. Reply in natural language only: tell them to tap View details on the hotel card for photos, amenities, and the full description. Never say you "called a tool", "ran hotel_details", or quote internal IDs. Do not paste raw JSON or API fields to the user. (Parameters are accepted for compatibility; the booking flow uses search enrichment on the carousel card.)
payment_tool
ChatGPTReturns a payment link after a pending hold exists (from book_hotel_tool). The traveler should already have confirmed hotel name, room, and guest details in chat before the hold was created; this step is only for choosing how to pay. The payment link appears as a "Pay now" button on screen — do not paste raw URLs in chat. Parameter : user_id (str): same as other tools bookingId (str): from book_hotel_tool; internal only — do not recite to the user. accept_language: (str) for the request header, paymentMethods: the payment methods, either "ApplePay", "CreditCard" or "Knet" :note: note that there is no other payment methods accepted. return: dict contains paymentLink (displayed as button in UI)
payment_tool
ChatGPTReturns a payment link after a pending hold exists (from book_hotel_tool). The traveler should already have confirmed hotel name, room, and guest details in chat before the hold was created; this step is only for choosing how to pay. The payment link appears as a "Pay now" button on screen — do not paste raw URLs in chat. Parameter : user_id (str): same as other tools bookingId (str): from book_hotel_tool; internal only — do not recite to the user. accept_language: (str) for the request header, paymentMethods: the payment methods, either "ApplePay", "CreditCard" or "Knet" :note: note that there is no other payment methods accepted. return: dict contains paymentLink (displayed as button in UI)
payment_tool
ChatGPTReturns a payment link after a pending hold exists (from book_hotel_tool). The traveler should already have confirmed hotel name, room, and guest details in chat before the hold was created; this step is only for choosing how to pay. The payment link appears as a "Pay now" button on screen — do not paste raw URLs in chat. Parameter : user_id (str): same as other tools bookingId (str): from book_hotel_tool; internal only — do not recite to the user. accept_language: (str) for the request header, paymentMethods: the payment methods, either "ApplePay", "CreditCard" or "Knet" :note: note that there is no other payment methods accepted. return: dict contains paymentLink (displayed as button in UI)
search_tool
ChatGPTsearch API, is the API that we use to get the hotels. fill the parameters from the user query and the previous destinations tool. Keep API parameters in English. If the user writes in Arabic, pass locale "ar" so the on-screen results use Arabic RTL, and respond in Arabic (translate API results if needed). QUICK SEARCH (city only, no dates/rooms specified): When the user mentions only a destination (e.g. "I want hotels in London") WITHOUT specifying dates, number of guests, or rooms: - Use today's date as fromDate and today + 2 days as toDate. - Use adultsCount = 1, childrenAges = [] (1 guest, 1 room). - Proceed immediately with destinations_tool → search_tool so results appear on screen. - After showing results, ask the user: "These results are for [today] to [today+2] with 1 guest. Would you like to change the dates, number of guests, or rooms?" the parameters are : 1 - destinationId: the id from the previous destinations tool. 2 - destinationType: City ( or Hotel or State) take from the previous tool. City if you are searching on city, State if you are searching on State 3 - cityId: the id from the previous tool. 4 - fromDate: yyyy-mm-dd always this format. 5 - toDate: yyyy-mm-dd always this format. 6 - adultsCount: [optional], the adults number in the room. default is 1 7 - childrenAges: [optional], the children number by ages, like if its [5, 12] its mean that there are 2 childes with ages 5 and 12. 8 - page: [optional], counter, the page number (1-10). Each page contains 5 hotels. default is 1 10 - filters_applied [optional], If the user want a filter, you must get the filters from :conditions: - if the destinationType is City or State, then destinationId and cityId must be the same, must be cityId. - The accepted children ages maximum is 18. - Non-numeric children ages are not accepted, and if the user gives a float number, make it integer. - The maximum dates are 30 days. and not before today date. and in range one year forward. and the date must include the days, the month. - Very large group like 20 adults and 10 children is not accepted. - You can't search with filters from the beginning: search once without filters, then use the returned search handle with filters_tool, then search again. Never mention that handle to the user. - the filter format is : "filters": [ { "filterId": "str", "optionsIds": [ "str" ] } ] return is : "search_token": str — pass only to fetch_rooms_tool / filters / booking; never quote to the user. "hotels": list of hotels, each hotel in object. CRITICAL — DISPLAY RULES: - CITY/STATE search: Results appear in the on-screen list. Never list hotel names, prices, stars, or room options in your reply. - SPECIFIC HOTEL search (destinationType "Hotel"): Only that hotel is returned for the UI (one card; detail may open automatically). Do NOT repeat long descriptions in chat; tell them they can tap the card for photos and full text; offer rooms or booking.
search_tool
ChatGPTsearch API, is the API that we use to get the hotels. fill the parameters from the user query and the previous destinations tool. Keep API parameters in English. If the user writes in Arabic, pass locale "ar" so the on-screen results use Arabic RTL, and respond in Arabic (translate API results if needed). QUICK SEARCH (city only, no dates/rooms specified): When the user mentions only a destination (e.g. "I want hotels in London") WITHOUT specifying dates, number of guests, or rooms: - Use today's date as fromDate and today + 2 days as toDate. - Use adultsCount = 1, childrenAges = [] (1 guest, 1 room). - Proceed immediately with destinations_tool → search_tool so results appear on screen. - After showing results, ask the user: "These results are for [today] to [today+2] with 1 guest. Would you like to change the dates, number of guests, or rooms?" the parameters are : 1 - destinationId: the id from the previous destinations tool. 2 - destinationType: City ( or Hotel or State) take from the previous tool. City if you are searching on city, State if you are searching on State 3 - cityId: the id from the previous tool. 4 - fromDate: yyyy-mm-dd always this format. 5 - toDate: yyyy-mm-dd always this format. 6 - adultsCount: [optional], the adults number in the room. default is 1 7 - childrenAges: [optional], the children number by ages, like if its [5, 12] its mean that there are 2 childes with ages 5 and 12. 8 - page: [optional], counter, the page number (1-10). Each page contains 5 hotels. default is 1 10 - filters_applied [optional], If the user want a filter, you must get the filters from :conditions: - if the destinationType is City or State, then destinationId and cityId must be the same, must be cityId. - The accepted children ages maximum is 18. - Non-numeric children ages are not accepted, and if the user gives a float number, make it integer. - The maximum dates are 30 days. and not before today date. and in range one year forward. and the date must include the days, the month. - Very large group like 20 adults and 10 children is not accepted. - You can't search with filters from the beginning: search once without filters, then use the returned search handle with filters_tool, then search again. Never mention that handle to the user. - the filter format is : "filters": [ { "filterId": "str", "optionsIds": [ "str" ] } ] return is : "search_token": str — pass only to fetch_rooms_tool / filters / booking; never quote to the user. "hotels": list of hotels, each hotel in object. CRITICAL — DISPLAY RULES: - CITY/STATE search: Results appear in the on-screen list. Never list hotel names, prices, stars, or room options in your reply. - SPECIFIC HOTEL search (destinationType "Hotel"): Only that hotel is returned for the UI (one card; detail may open automatically). Do NOT repeat long descriptions in chat; tell them they can tap the card for photos and full text; offer rooms or booking.
search_tool
ChatGPTsearch API, is the API that we use to get the hotels (the HOTEL carousel). fill the parameters from the user query and the previous destinations tool. Keep API parameters in English. If the user writes in Arabic, pass locale "ar" so the on-screen results use Arabic RTL, and respond in Arabic (translate API results if needed). REQUIRED — user_id: Always pass the guest id returned by get_guest_session_tool on EVERY call. Use the same user_id you passed to destinations_tool. Without it the search cannot run. ⚠️ DO NOT CALL THIS when the user just names a hotel that is already in the currently shown hotel list. After a city/state search has shown the hotel carousel, a message that is/contains one of those hotel names (even a bare name with no "choose"/"book" words) means the user wants that hotel's ROOMS — call fetch_rooms_tool with the existing searchToken, NOT search_tool. Re-searching would wrongly show another hotel card instead of rooms. Only call search_tool for a brand-new destination (different city/area) or a hotel that is NOT in the shown list. QUICK SEARCH (city only, no dates/rooms specified): When the user mentions only a destination (e.g. "I want hotels in London") WITHOUT specifying dates, number of guests, or rooms: - Use today's date as fromDate and today + 2 days as toDate. - Use adultsCount = 1, childrenAges = [] (1 guest, 1 room). - Proceed immediately with destinations_tool → search_tool so results appear on screen. - After showing results, ask the user: "These results are for [today] to [today+2] with 1 guest. Would you like to change the dates, number of guests, or rooms?" the parameters are : 0 - user_id: REQUIRED. Guest id from get_guest_session_tool — pass on every call (aliases: guest_id, session_id, guest_session_id). 1 - destinationId: the id from the previous destinations tool (same as id or cityId for City/State). 2 - destinationType: City ( or Hotel or State) take from the previous tool. City if you are searching on city, State if you are searching on State 3 - cityId: the id from the previous tool. 4 - fromDate: yyyy-mm-dd always this format. 5 - toDate: yyyy-mm-dd always this format. 6 - adultsCount: [optional], the adults number in the room. default is 1 7 - childrenAges: [optional], the children number by ages, like if its [5, 12] its mean that there are 2 childes with ages 5 and 12. 8 - page: [optional], counter, the page number (1-10). Each page contains 5 hotels. default is 1 10 - filters_applied [optional], If the user want a filter, you must get the filters from :conditions: - if the destinationType is City or State, then destinationId and cityId must be the same, must be cityId. - The accepted children ages maximum is 18. - Non-numeric children ages are not accepted, and if the user gives a float number, make it integer. - The maximum dates are 30 days. and not before today date. and in range one year forward. and the date must include the days, the month. - Very large group like 20 adults and 10 children is not accepted. - You can't search with filters from the beginning: search once without filters, then use the returned search handle with filters_tool, then search again. Never mention that handle to the user. - the filter format is : "filters": [ { "filterId": "str", "optionsIds": [ "str" ] } ] return is : "search_token": str — pass only to fetch_rooms_tool / filters / booking; never quote to the user. "hotels": list of hotels, each hotel in object. CRITICAL — DISPLAY RULES: - CITY/STATE search: Results appear in the on-screen list. Never list hotel names, prices, stars, or room options in your reply. - SPECIFIC HOTEL search (destinationType "Hotel"): Only that hotel is returned for the UI as one carousel card. Do NOT repeat long descriptions in chat; point to the card and offer rooms or booking.