search-room

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

search-room

search-room

Get all room types and rate packages for one specific hotel. Use this when the user wants to explore alternatives beyond the default package returned by
search-hotel
.
获取某一特定酒店的所有房型及价格套餐。当用户想要探索search-hotel返回的默认套餐之外的其他选项时,可使用此技能。

When to use

使用时机

After the user has run
search-hotel
and wants to drill into a specific hotel:
  • "Show me the rooms at Park Hyatt Tokyo"
  • "What room types does hotel #2 have?"
  • "I want a refundable rate"
  • "Is there a package with breakfast included?"
Do NOT use this skill if the user hasn't already searched for hotels — run
search-hotel
first to obtain a
sessionId
.
在用户运行search-hotel后,想要深入了解某一特定酒店时:
  • "显示东京柏悦酒店的房型"
  • "酒店#2有哪些房型?"
  • "我想要可退款的价格方案"
  • "有没有包含早餐的套餐?"
如果用户尚未搜索酒店,请不要使用此技能——先运行search-hotel获取sessionId。

Prerequisites

前置条件

You need both:
  1. A
    hotelId
    from a prior
    search-hotel
    result
  2. The
    sessionId
    from that same search
Both are in the JSON output of
search-hotel
. Don't ask the user — pull them from the previous tool output in your conversation.
你需要同时具备:
  1. 来自之前search-hotel结果的hotelId
  2. 同一搜索的sessionId
两者都在search-hotel的JSON输出中。不要询问用户——从对话中之前的工具输出中提取。

How to call

调用方式

bash
npx @tvl-justin/travel-cli@latest search-package \
  --hotel-id "<hotelId>" \
  --session-id "<sessionId>" \
  --checkin <YYYY-MM-DD> \
  --checkout <YYYY-MM-DD>
--checkin
and
--checkout
are required by the CLI — reuse the dates from the prior
search-hotel
call.
bash
npx @tvl-justin/travel-cli@latest search-package \
  --hotel-id "<hotelId>" \
  --session-id "<sessionId>" \
  --checkin <YYYY-MM-DD> \
  --checkout <YYYY-MM-DD>
CLI需要
--checkin
--checkout
参数——复用之前search-hotel调用中的日期。

Optional overrides

可选覆盖参数

If the user wants different dates or occupancy than the original search, pass them explicitly:
bash
npx @tvl-justin/travel-cli@latest search-package \
  --hotel-id "h_001" \
  --session-id "abc123" \
  --checkin 2026-05-02 \
  --checkout 2026-05-06 \
  --rooms "2,8"
如果用户想要与原搜索不同的日期或入住人数,请明确传递这些参数:
bash
npx @tvl-justin/travel-cli@latest search-package \
  --hotel-id "h_001" \
  --session-id "abc123" \
  --checkin 2026-05-02 \
  --checkout 2026-05-06 \
  --rooms "2,8"

Output

输出

json
{
  "sessionId": "abc123",
  "hotelId": "h_001",
  "hotelName": "Park Hyatt Tokyo",
  "options": [
    {
      "packageId": "pkg_a",
      "roomName": "Park Deluxe King",
      "mealType": "Breakfast included",
      "totalPriceAllRoomsUSD": 1800,
      "totalPricePerNightAllRoomsUSD": 450,
      "refundability": "Refundable",
      "nights": 4,
      "availableRooms": 3
    }
  ]
}
json
{
  "sessionId": "abc123",
  "hotelId": "h_001",
  "hotelName": "Park Hyatt Tokyo",
  "options": [
    {
      "packageId": "pkg_a",
      "roomName": "Park Deluxe King",
      "mealType": "Breakfast included",
      "totalPriceAllRoomsUSD": 1800,
      "totalPricePerNightAllRoomsUSD": 450,
      "refundability": "Refundable",
      "nights": 4,
      "availableRooms": 3
    }
  ]
}

Presenting to the user

向用户展示结果

List packages sorted by price. Highlight what differs (meal type, refundability). Example:
Park Hyatt Tokyo — 4 nights, May 1–5:
  1. Park Deluxe King — $450/night · Breakfast included · Free cancellation
  2. Park Deluxe King — $400/night · Room only · Non-refundable
  3. Park Suite — $720/night · Breakfast + dinner · Free cancellation
Which one would you like to book?
Save each
packageId
— that's what
book-hotel
needs.
按价格排序列出套餐。突出显示差异点(餐饮类型、退款政策)。示例:
东京柏悦酒店——4晚,5月1日至5日:
  1. Park Deluxe King——450美元/晚 · 含早餐 · 免费取消
  2. Park Deluxe King——400美元/晚 · 仅客房 · 不可退款
  3. Park Suite——720美元/晚 · 含早餐+晚餐 · 免费取消
您想要预订哪一个?
保存每个packageId——这是book-hotel所需的参数。

Edge cases

边缘情况

  • If
    options
    is empty, the hotel has no availability for those dates. Suggest alternatives (different dates or run
    search-hotel
    again).
  • Some packages have a
    cancellation.time_remaining_human
    field. Surface it when refundability matters: "Free cancellation expires in 18 hours."
  • 如果
    options
    为空,说明该酒店在这些日期没有可用房源。建议替代方案(更换日期或重新运行search-hotel)。
  • 部分套餐包含
    cancellation.time_remaining_human
    字段。当退款政策相关时,需展示该信息:“免费取消将在18小时后过期。”