@gojinko/plugin 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jinko",
3
3
  "description": "Search flights, book trips, and manage bookings with the Jinko Travel API. Connects to the Jinko MCP server for live flight pricing, trip management, and payment.",
4
- "version": "1.2.1",
4
+ "version": "1.3.0",
5
5
  "author": {
6
6
  "name": "Jinko",
7
7
  "url": "https://gojinko.com"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jinko",
3
3
  "description": "Search flights, book trips, and manage bookings with the Jinko Travel API. Connects to the Jinko MCP server for live flight pricing, trip management, and payment.",
4
- "version": "1.2.1",
4
+ "version": "1.3.0",
5
5
  "author": {
6
6
  "name": "Jinko",
7
7
  "url": "https://gojinko.com"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gojinko/plugin",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "description": "Jinko Travel plugin for Claude Code and OpenAI Codex — flight search, booking, and trip management via MCP",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: search-hotels
3
- description: Search live hotel inventory and rates by destination, dates, and occupancy using the Jinko Travel API. Use when the user wants to find hotels, compare rates, or book a hotel.
3
+ description: Search live hotel inventory and rates by destination, dates, and occupancy — or look up a specific hotel by name — using the Jinko Travel API. Use when the user wants to find hotels, compare rates, or book a hotel.
4
4
  ---
5
5
 
6
6
  # Hotel Search
@@ -11,14 +11,28 @@ Search live hotel inventory using the `hotel_search` Jinko MCP tool. Returns hot
11
11
 
12
12
  Live search — returns real-time availability and pricing from hotel suppliers.
13
13
 
14
+ `hotel_search` has **two modes**, determined by the `destination` shape:
15
+
16
+ | Mode | When | Destination shape |
17
+ |---|---|---|
18
+ | **A — Rate Lookup** | User named a specific hotel they want to book | `{ hotel_name }` or `{ hotel_ids }` |
19
+ | **B — Hotel Search** | User is exploring a destination | `{ query }`, `{ city_name + country_code }`, `{ latitude + longitude + radius_km }`, or `{ place_id }` |
20
+
21
+ In **Mode A**, the server resolves the hotel and returns its rates plus a few **`nearby_alternatives`** (other hotels within ~2km, same dates+occupancy). `filters` are ignored in Mode A — the user already picked the property.
22
+
23
+ In **Mode B**, `filters` narrow the result set (star rating, facility, chain, etc.).
24
+
14
25
  **Required params:**
15
26
 
16
- - **Destination** (provide exactly one):
17
- - `query`: free-text (e.g. `"Paris"`, `"beach resort near Barcelona"`)
18
- - `city_name` + optional `country_code`: structured (e.g. `"New York"` + `"us"`)
19
- - `latitude` + `longitude` + optional `radius_km`: geo-radius (max 50km)
20
- - `place_id`: Google Places ID
21
- - `hotel_ids`: re-shop specific hotels by ID
27
+ - **Destination** (provide exactly one shape):
28
+ - **Mode A:**
29
+ - `hotel_name`: the user-named hotel (e.g. `"Hotel Calimala"`, `"The St. Regis Rome"`, `"Hôtel Costes"`). **Always pair with `country_code` and `city_name` when known** — name lookup runs against a 1.74M-hotel catalog and precision drops sharply on common names without scope. Server returns 422 `HOTEL_NAME_LOW_CONFIDENCE` if no candidate clears the auto-pick threshold (see error handling below).
30
+ - `hotel_ids`: re-shop specific hotels by ID (from a prior search).
31
+ - **Mode B:**
32
+ - `query`: free-text (e.g. `"Paris"`, `"beach resort near Barcelona"`). Only for unambiguous cities/POIs — returns 0 for islands, regions, countries, archipelagos.
33
+ - `city_name` + `country_code`: structured (e.g. `"New York"` + `"us"`). Best for ambiguous city names or when the user named a primary city (e.g. `"Mahón"` + `"es"` for Menorca).
34
+ - `latitude` + `longitude` + optional `radius_km`: geo-radius (max 50km). Best for islands, regions, neighborhoods.
35
+ - `place_id`: Google Places ID.
22
36
 
23
37
  - `checkin`: check-in date (YYYY-MM-DD)
24
38
  - `checkout`: check-out date (YYYY-MM-DD)
@@ -30,7 +44,7 @@ Live search — returns real-time availability and pricing from hotel suppliers.
30
44
  **Optional params:**
31
45
  - `currency`: ISO 4217 (default USD)
32
46
  - `guest_nationality`: ISO 3166-1 alpha-2 (affects rate availability)
33
- - `filters`: `{ min_rating, star_rating, min_reviews, hotel_type_ids, chain_ids, facility_ids, max_results }`
47
+ - `filters`: `{ min_rating, star_rating, min_reviews, hotel_type_ids, chain_ids, facility_ids, max_results }` — **Mode B only**. Server ignores filters in Mode A and includes a `warnings` entry on the response; future versions may reject the combination outright.
34
48
 
35
49
  **Examples:**
36
50
 
@@ -68,12 +82,60 @@ Two rooms with kids:
68
82
  }
69
83
  ```
70
84
 
85
+ Look up a specific hotel by name (Mode A):
86
+ ```json
87
+ {
88
+ "destination": {
89
+ "hotel_name": "Hotel Calimala",
90
+ "country_code": "it",
91
+ "city_name": "Florence"
92
+ },
93
+ "checkin": "2026-07-15",
94
+ "checkout": "2026-07-18",
95
+ "adults": 2,
96
+ "currency": "EUR"
97
+ }
98
+ ```
99
+
71
100
  **Response:** List of hotels with `hotel_id`, `name`, `address`, `star_rating`, `rating`, `review_count`, `main_photo`, and a `rooms[]` list. Each room has `rates[]` — each rate includes:
72
101
  - `offer_id`: the `htl_*` token (use as `trip_item_token` for booking)
73
102
  - `board_type` / `board_name`: meal plan (RO = Room Only, BB = Bed & Breakfast, etc.)
74
103
  - `total_amount` + `currency`: total price for the stay
75
104
  - `is_refundable` + `free_cancellation_until`
76
105
 
106
+ In **Mode A**, the response also includes:
107
+ - `nearby_alternatives`: list of hotels within ~2km of the matched property, in the same response shape (hotel + rooms + rates) so the user can compare. Empty when none are available for the requested dates.
108
+ - `warnings` (only if you passed `filters` alongside `hotel_name`/`hotel_ids`): explains that filters were dropped because Mode A wins on name match.
109
+
110
+ ### Error handling — `HOTEL_NAME_LOW_CONFIDENCE`
111
+
112
+ When `hotel_name` is used but no candidate clears the auto-pick threshold (~0.7), the server returns HTTP 422 with this body:
113
+
114
+ ```json
115
+ {
116
+ "error": {
117
+ "code": "HOTEL_NAME_LOW_CONFIDENCE",
118
+ "message": "No high-confidence match for 'Hotel Calimal' in Florence, IT (top score 0.45).",
119
+ "top_candidates": [
120
+ { "hotel_id": "lp220fa7", "name": "Hotel Calimala Florence", "city": "Florence", "score": 0.45 },
121
+ { "hotel_id": "lp657fada9", "name": "Hotel Calimala Milano", "city": "Milan", "score": 0.42 }
122
+ ],
123
+ "suggested_retry": {
124
+ "destination": { "city_name": "Florence", "country_code": "it" },
125
+ "rationale": "search all Florence hotels instead of name-resolving"
126
+ }
127
+ }
128
+ }
129
+ ```
130
+
131
+ This is **actionable**, not fatal. Pick one:
132
+
133
+ 1. **Top candidate is what the user meant** (typo / spelling variant) → confirm with the user, then retry `hotel_search` with `destination: { hotel_ids: ["<top.hotel_id>"] }`.
134
+ 2. **None of the candidates fit** → use `suggested_retry.destination` to fall back to a city-level search. Tell the user: _"I couldn't pin down 'Hotel Calimal' — want me to search all Florence hotels instead?"_
135
+ 3. **User likely meant a different city** → ask the user to clarify the city/country, then retry with `hotel_name` + the corrected `country_code` / `city_name`.
136
+
137
+ Don't silently auto-pick a low-confidence candidate — booking the wrong hotel is worse than asking one clarifying question.
138
+
77
139
  ## hotel_details
78
140
 
79
141
  Optional follow-up to `hotel_search`. Returns rich metadata for a single hotel — gallery, full facilities list, policies, per-room metadata (bed types, size, amenities, views). Use when the user wants more info on a specific result before booking.