Tool description (what the LLM sees)
Tool description (what the LLM sees)
Search flights between a known origin and destination using cached pricing. Use this tool whenever the user specifies BOTH where they are flying FROM and where they are flying TO.
WHEN TO USE THIS TOOL (CRITICAL):
- The user provides both an origin AND a destination (city or airport)
- Examples: "Paris to Barcelona", "JFK to CDG", "London to NYC for a weekend"
- Supports loose / flexible dates: single dates, date arrays, date ranges, stay_days
- ALSO the right tool for "cheapest flight", "best flight", "find me a flight", "cheapest date" phrasings, returns the cheapest cached itineraries.
WHEN TO USE find_destination INSTEAD:
- The user does NOT specify a destination: "Where should I go from Paris?", "Best deals from NYC"
- The user wants inspiration: "Beach destinations from London", "Cheap flights from SF"
WHEN TO USE flight_search INSTEAD:
- The user has committed to EXACT dates, single departure date AND single return date on one specific route.
- Example: "Paris → NYC, June 17 → June 26"
- flight_search hits live pricing (each call has a cost) and is the step immediately before booking. Use only once route + both dates are locked.
IMPORTANT:
All dates in query parameters (departure_dates, departure_date_ranges, return_dates, return_date_ranges) MUST be in the future. Never use past dates.
Please fill as much as possible search parameters based on user intent to get best results.
Origin and destination must be IATA city code by default except if the user specifies IATA Airport code in the search.
ROUTE SEARCH:
- Use exact 3-letter IATA airport codes or IATA city code for both origin and destination
- Date ranges OR stay duration for flexible trip planning
- Natural trip duration (stay_days) instead of exact return dates
- By default, please search roundtrip flights unless user specifies one-way. Use trip_type="oneway" ONLY when the user explicitly asks for a one-way trip
USE CASES:
✓ "Find flights from JFK to CDG next month" - Specific route with date range
✓ "Fly from Los Angeles to Tokyo for a week in December" - Uses departure_date + stay_days
✓ "Paris to Barcelona for a weekend in April" - Specific route
✓ "Cheapest flight from ORD to LHR under $600" - Specific route with budget
✓ "Direct flight in business class from New York to London" - Specific route with preferences
Flow: flight_calendar → flight_search (price-check) → trip → checkout
PRICES: in the text output, price is already a decimal in major units, display as-is, do NOT divide. In structuredContent, flights[].total_amount and origin_total_amount are objects {value, currency, decimal_places} where value is an INTEGER in minor units, divide value by 10^decimal_places before displaying those (value 15977 with decimal_places 2 is 159.77 USD).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
origin | string | Yes | Origin airport IATA code or city code (3 letters). Examples: “JFK”, “PAR”. |
destination | string | Yes | Destination airport IATA code or city code (3 letters). Examples: “CDG”, “NRT”. |
trip_type | enum ("oneway" | "roundtrip") | Yes | Trip type: “oneway” or “roundtrip”. |
departure_dates | array<string> | No | Specific departure dates (YYYY-MM-DD). Multiple dates searched with OR logic. |
departure_date_ranges | array<object> | No | Departure date ranges for flexible search. |
departure_date_ranges[].start | string | Yes | Range start date (YYYY-MM-DD) |
departure_date_ranges[].end | string | Yes | Range end date (YYYY-MM-DD) |
return_dates | array<unknown> | No | Specific return dates (YYYY-MM-DD) for round-trip flights. |
return_date_ranges | array<object> | No | Return date ranges for flexible round-trip search. |
return_date_ranges[].start | string | Yes | Range start date (YYYY-MM-DD) |
return_date_ranges[].end | string | Yes | Range end date (YYYY-MM-DD) |
stay_days | integer | No | Exact stay duration in days. Auto-calculates return date. |
stay_days_range | object | No | Flexible stay duration range. Example: {min: 5, max: 10} |
stay_days_range.min | integer | Yes | Minimum stay duration in days |
stay_days_range.max | integer | Yes | Maximum stay duration in days |
direct_only | boolean | No | Only return nonstop flights. |
cabin_class | enum ("economy" | "premium_economy" | "business" | "first") | No | Cabin class filter. |
max_total | number | No | Maximum total price for the trip (canonical name). Preferred over max_price. |
sort_by | enum ("lowest" | "recommendation") | No | Sort order. Default: “lowest” (cheapest first). |
currency | string | No | ISO 4217 currency code. Defaults to “USD”. |
locale | string | No | BCP 47 locale. Defaults to “en-US”. |
format | enum ("text" | "json") | No | Response format. “text” returns plain text for LLMs. “json” returns structured JSON. |
limit | integer | No | Max results to return per page (1-100). Default 20. |
offset | integer | No | Number of results to skip, for pagination. Default 0. |
user_intent | string | No | The end user’s current request in their own words, e.g. “find a cheap flight to Tokyo in mid-June”. Pass it as-is when short; otherwise condense the goal and constraints into 1-2 sentences. Strip personal identifiers (names, emails, phone numbers, addresses, payment details), replace them with placeholders like “[name]”. Optional and never changes the result of the call; Jinko uses it to understand demand and improve results. |
Examples
Cheapest days to fly JFK→CDG in June:{
"name": "flight_calendar",
"arguments": {
"origin": "JFK",
"destination": "CDG",
"trip_type": "roundtrip",
"departure_date_start": "2026-06-01",
"departure_date_end": "2026-06-30",
"stay_days": 7,
"currency": "USD"
}
}
{
"name": "flight_calendar",
"arguments": {
"origin": "CDG",
"destination": "NRT",
"trip_type": "oneway",
"departure_date_start": "2026-09-01",
"departure_date_end": "2026-09-30",
"cabin_class": "business",
"direct_only": true,
"currency": "EUR"
}
}
offer_token; feed it to flight_search for live pricing before booking.