flexible-flight-search10.1 KB
View saved version →
---
name: flexible-flight-search
description: Find and compare Trip.com low-price flight options across flexible, approximate, or range-based dates for one-way or round-trip travel. Present results using the associated Trip.com widget.
---
# Flexible-date flight search
## Input collection first
For flight-search requests, apply this workflow before asking for inputs or calling a search tool. Existing-result comparisons and general Trip help follow their respective sections below.
1. Resolve the known route, travel dates and trip intent from the conversation, then apply only valid schema defaults. Identify all genuinely missing required inputs. Do not ask for known values or require optional preferences to fill a richer form. If nothing is missing, call the appropriate search tool directly without an input form.
2. If even ONE required input is missing, check the native GPT Intelligent UI form capabilities actually exposed by the Host before writing a plain-text question. When a compatible form with a working submission path is available, you MUST use it first. A single missing travel-date input is enough: show the supported specific-date or date-window controls appropriate to the intent below, preserve the known route, and wait for the user's submission. Collect multiple missing inputs together using only supported controls; known values may be shown as context, not required again.
3. Use a plain-text question only when no compatible native form capability is exposed, the available form cannot collect/submit the required input, or an actual rendering/submission failure occurs. Do not choose text because only one field is missing, because it is easier, or because the MCP tool declares only a results Widget and no input-form resource. If Host capability is unknown, inspect the available capabilities first; do not invent a tool/API or claim a form was attempted or failed without evidence. For a necessary fallback, ask for ALL currently missing required values in one concise question.
4. Wait for valid submitted values before searching. Reuse previously known values, validate the submission and request only remaining corrections together. Call the appropriate Trip tool only after required inputs are complete, then display its associated results Widget. Input forms belong to the Host; `_meta.ui.resourceUri` identifies the results Widget and does not decide whether native input forms are available.
Before collecting date or trip-type inputs, changing the form mode, or validating dates before a search, you MUST read and follow [Input collection details](references/input-collection.md). It contains the existing date-form layouts, round-trip rules, validation limits and examples.
## Tool routing
Use `search_low_price_flights_v2` whenever travel dates are flexible, approximate, or a range, even without the word "cheap". For a specific departure day, including "cheapest on that day", use `search_flights` according to its schema. For mixed exact and flexible alternatives, ask whether to run exact search, flexible search, or both separately.
## Request construction
- Obtain departure and arrival locations and a concrete departure date window before calling. Obtain the return departure window for round trips. Resolve relative dates using the current date and user timezone. Clarify the year, market, or dates of ambiguous named holidays.
- Call `search_low_price_flights_v2` for actual fare options. Pass only `tripType`, unchanged `rawQuery`, `locale`, and `segments`. Use en-US and USD as defaults where applicable; do not add a currency parameter that the schema does not accept.
- Each segment has exactly one `origin.name`, one `destination.name`, and `departureTimeRange` with `startTime` and `endTime` in `YYYY-MM-DD`. Preserve the user's country/region, city, or airport granularity; do not substitute inferred cities or flight codes.
- One-way uses one segment; round-trip uses two reciprocal segments. Date ranges describe departure da
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 1 — file references are metadata, not package contents.
flight-search9.86 KB
View saved version →
---
name: flight-search
description: Search and compare Trip.com flights for a fixed departure date, including the cheapest flight on a specific day and one-way or round-trip travel. Present results using the associated Trip.com widget.
---
# Fixed-date flight search
## Input collection first
For flight-search requests, apply this workflow before asking for inputs or calling a search tool. Existing-result comparisons and general Trip help follow their respective sections below.
1. Resolve the known route, travel dates and trip intent from the conversation, then apply only valid schema defaults. Identify all genuinely missing required inputs. Do not ask for known values or require optional preferences to fill a richer form. If nothing is missing, call the appropriate search tool directly without an input form.
2. If even ONE required input is missing, check the native GPT Intelligent UI form capabilities actually exposed by the Host before writing a plain-text question. When a compatible form with a working submission path is available, you MUST use it first. A single missing travel-date input is enough: show the supported specific-date or date-window controls appropriate to the intent below, preserve the known route, and wait for the user's submission. Collect multiple missing inputs together using only supported controls; known values may be shown as context, not required again.
3. Use a plain-text question only when no compatible native form capability is exposed, the available form cannot collect/submit the required input, or an actual rendering/submission failure occurs. Do not choose text because only one field is missing, because it is easier, or because the MCP tool declares only a results Widget and no input-form resource. If Host capability is unknown, inspect the available capabilities first; do not invent a tool/API or claim a form was attempted or failed without evidence. For a necessary fallback, ask for ALL currently missing required values in one concise question.
4. Wait for valid submitted values before searching. Reuse previously known values, validate the submission and request only remaining corrections together. Call the appropriate Trip tool only after required inputs are complete, then display its associated results Widget. Input forms belong to the Host; `_meta.ui.resourceUri` identifies the results Widget and does not decide whether native input forms are available.
Before collecting date or trip-type inputs, changing the form mode, or validating dates before a search, you MUST read and follow [Input collection details](references/input-collection.md). It contains the existing date-form layouts, round-trip rules, validation limits and examples.
## Tool routing
Use `search_flights` for a specific departure date, even when the user asks for the cheapest fare. Resolve relative dates using the current date and user timezone. If the date is missing, collect a specific day or flexible date window through the input workflow above. For flexible dates, use `search_low_price_flights_v2` according to its schema instead. For mixed exact and flexible alternatives, ask whether to search one or both separately.
## Request construction
- Before searching, obtain the departure and arrival locations and departure date; obtain the return departure date for a round trip. Ask only for missing required information. Apply schema defaults where the user has not specified a preference; use en-US and USD as defaults where applicable.
- Call `search_flights` to obtain actual flight results. Pass `rawQuery` unchanged and dates as `YYYYMMDD`. Do not substitute remembered or invented flights.
- For one-way travel use one segment. For round trips use two reciprocal segments with the same location sets reversed. The server returns complete round-trip options in one call; do not invent a separate return-selection tool or combine unrelated one-way offers as a round-trip fare.
- Keep explicitly requested location alternatives i
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 1 — file references are metadata, not package contents.