search-room
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesesearch-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 and wants to drill into a specific hotel:
search-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 first to obtain a .
search-hotelsessionId在用户运行search-hotel后,想要深入了解某一特定酒店时:
- "显示东京柏悦酒店的房型"
- "酒店#2有哪些房型?"
- "我想要可退款的价格方案"
- "有没有包含早餐的套餐?"
如果用户尚未搜索酒店,请不要使用此技能——先运行search-hotel获取sessionId。
Prerequisites
前置条件
You need both:
- A from a prior
hotelIdresultsearch-hotel - The from that same search
sessionId
Both are in the JSON output of . Don't ask the user — pull them from the previous tool output in your conversation.
search-hotel你需要同时具备:
- 来自之前search-hotel结果的hotelId
- 同一搜索的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--checkoutsearch-hotelbash
npx @tvl-justin/travel-cli@latest search-package \
--hotel-id "<hotelId>" \
--session-id "<sessionId>" \
--checkin <YYYY-MM-DD> \
--checkout <YYYY-MM-DD>CLI需要和参数——复用之前search-hotel调用中的日期。
--checkin--checkoutOptional 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:
- Park Deluxe King — $450/night · Breakfast included · Free cancellation
- Park Deluxe King — $400/night · Room only · Non-refundable
- Park Suite — $720/night · Breakfast + dinner · Free cancellation
Which one would you like to book?
Save each — that's what needs.
packageIdbook-hotel按价格排序列出套餐。突出显示差异点(餐饮类型、退款政策)。示例:
东京柏悦酒店——4晚,5月1日至5日:
- Park Deluxe King——450美元/晚 · 含早餐 · 免费取消
- Park Deluxe King——400美元/晚 · 仅客房 · 不可退款
- Park Suite——720美元/晚 · 含早餐+晚餐 · 免费取消
您想要预订哪一个?
保存每个packageId——这是book-hotel所需的参数。
Edge cases
边缘情况
- If is empty, the hotel has no availability for those dates. Suggest alternatives (different dates or run
optionsagain).search-hotel - Some packages have a field. Surface it when refundability matters: "Free cancellation expires in 18 hours."
cancellation.time_remaining_human
- 如果为空,说明该酒店在这些日期没有可用房源。建议替代方案(更换日期或重新运行search-hotel)。
options - 部分套餐包含字段。当退款政策相关时,需展示该信息:“免费取消将在18小时后过期。”
cancellation.time_remaining_human