add_booking
ChatGPTMANUALLY add/create a hotel stay, flight, train, car rental, transfer or long-distance bus on a trip from details given in chat — no document or confirmation needed. Use this whenever the user wants to add a booking by hand ("add the Ritz-Carlton Warsaw Aug 30 – Sep 1", "I'm flying LO 281 on Friday", "FlixBus Kyiv to Warsaw on the 2nd"). Segment types are flight, hotel, car, train, transfer, bus. A scheduled coach with a ticket is bus; a hotel or airport shuttle ride is a transfer. Dates the user actually stated are required; never guess missing dates — ask.
create_trip
ChatGPTCreate a new empty trip. Use only when the user explicitly wants a trip without a booking — imported bookings create/match trips automatically.
delete_booking
ChatGPTDelete a booking AND its segments. Restorable for 30 days (restore_deleted). Flight alerts/status history on deleted flight segments are lost (alerts re-arm if restored). Requires expected_updated_at of the booking.
delete_segment
ChatGPTDelete one segment. Restorable for 30 days (restore_deleted). For flight segments, active flight alerts and status history on the segment are lost (alerts re-arm automatically if restored). Requires expected_updated_at.
delete_trip
ChatGPTDelete an ENTIRE trip with all bookings and segments. Requires confirm_title matching the trip's exact title AND expected_updated_at. Sharing links die permanently (not restored); flight alerts/status history are lost; trip+bookings+segments are restorable for 30 days.
get_booking
ChatGPTOne booking with its segments nested by type (flights, hotels, trains, cars, transfers, buses) — the same shape get_trip returns for a booking, without loading the trip. Use before update_/delete_ on a booking or its segments to get fresh expected_updated_at tokens without loading the whole trip.
get_import_guide
ChatGPTHow to add bookings to TravCozy hands-free by forwarding confirmation emails. Call this when the user asks how to import bookings, or suggest it after adding a booking manually — forwarding is the zero-effort path.
get_trip
ChatGPTFull detail of one trip: bookings with their nested segments (flights, hotels, trains, car rentals, transfers, buses) plus unattached segments, and the day-by-day timeline grouping (identical to the TravCozy app's timeline). status is derived from the dates.
get_trip_gaps
ChatGPTFind what's MISSING from a trip: nights with no accommodation booked, and arrivals (flight/train/bus) with no onward transport within 4 hours. Includes cached weather for the trip days when available. Use this to proactively help the user complete their trip.
get_upcoming
ChatGPTThe next N days of travel events across ALL trips, sorted — the "when is my flight?" tool. Events: flight/train/bus departures, hotel check-ins, car and transfer pickups.
list_trips
ChatGPTList the user's trips with dates, destination, status and per-type segment counts. status is derived from the dates: upcoming | active | completed | cancelled. scope: 'upcoming' (default) = trips not yet ended, 'past' = ended, 'all'.
move_booking
ChatGPTMove a booking (with all its segments) to another trip. Requires expected_updated_at of the booking.
move_segment
ChatGPTMove an unattached segment to another trip (segments inside a booking move with their booking — use move_booking). Requires expected_updated_at of the segment.
restore_deleted
ChatGPTRestore a delete made in the last 30 days, using the restore_group returned by the delete. Restores trips/bookings/segments and the full passenger graph — roster, ticket/EMD documents and price breakdown lines, including which document each charge belongs to and which ticket each replaced — all with their original ids. restored_passengers counts roster entries only; their documents and charges are not counted separately. NOT restored: sharing links (recreate deliberately), weather cache (refetches), notifications, flight status history (alerts re-arm automatically).
search_trips
ChatGPTSearch trips by free-text query (title/destination), destination, and/or date-range overlap. Same row shape as list_trips.
update_booking
ChatGPTUpdate booking-level fields (confirmation number, price, currency, source, passenger, notes) — not its segments. Requires expected_updated_at from a fresh read.
update_segment
ChatGPTUpdate one segment's fields (times, locations, names, prices, notes). segment_type: flight | hotel | car | train | transfer | bus. It names the segment that already exists and is never a conversion — there is no way to turn a transfer into a bus here; delete and re-add instead. Datetimes are LOCAL wall-clock "YYYY-MM-DDTHH:mm" — never converted. Requires expected_updated_at from a fresh read.
update_trip
ChatGPTUpdate a trip's own fields (title, destination, dates, type, status). Pass fit_dates:true instead of start/end to auto-fit the dates to the trip's segments. Requires expected_updated_at from a fresh read.
upload_booking
ChatGPTImport a booking confirmation the user pasted or attached in chat (email text, PDF, or image/screenshot). TravCozy extracts the booking, matches it to the right trip by travel dates (or creates one), and stores it. Prefer this over add_booking whenever a document exists.