用途:通过 Swiggy Dineout MCP 服务器(mcp.swiggy.com/dineout)帮助用户预订餐厅桌位。
主要能力与流程:get_saved_locations → search_restaurants_dineout → get_restaurant_details → get_available_slots → book_table(免费)或 create_cart → get_payment_options → book_table(UPI)→ check_payment_status → confirm_order → get_booking_status → cancel_booking。
位置:Dineout 工具使用 latitude/longitude(不是 lat/lng)。已保存位置不返回坐标;search_restaurants_dineout 与 get_restaurant_details 会返回,需复用这些精确值用于时段、购物车和预订。“附近/家/公司”先调 get_saved_locations 并让用户选择;具名城市/区域直接传坐标;未知地点应询问,不得替换为其他城市。
搜索:search_restaurants_dineout { query, addressId | latitude+longitude, limit?, offset? },query 只用一个词(名称、菜系、区域、场所类型或氛围);给出坐标时不要加地点词。默认 10 条,最多 30 条,可用 offset 翻页。让用户自行选择,不要自动调用详情或时段。
详情与时段:get_restaurant_details { restaurantId, latitude, longitude } 返回优惠(offerCategory 为 prebooking/walkin、coverCharge、discountPercentage)、设施、菜单图片、营业时间;先展示优惠再询问时段。get_available_slots { restaurantId, date, latitude, longitude },date 为 YYYY-MM-DD 或 epoch 秒,返回该日期起 7 天;按 slots[].dateStr + displayTime 匹配用户日期与时间,窗口内每 15 分钟均可预订,时间为 IST。
预订:除用户消息以“Confirm booking:”开头外,预订前须确认餐厅、日期、时间、人数(1–20)及免费/价格。免费优惠(isFree: true)直接 book_table,需原样复制 slotId、itemId、reservationTime,返回 orderId。付费预购(isFree: false)先 create_cart(cartType: "DEAL_TICKET_PURCHASE"),用户选择支付后再 get_payment_options 并 book_table(paymentMethod: "UPI",intentApp 或 generateUPIQR: true,cartKey);返回 PENDING_PAYMENT 时不得宣布已确认,需按 swiggy-mcp-payments 流程处理。桌边账单支付使用 cartType: "DINEOUT" 与 billAmount。
get_booking_status { orderId } 返回状态、canCancel 与预订详情,应向用户发送确认信息和餐厅地址。cancel_booking { orderId, cancellationReason? } 仅在用户明确要求、且 orderId 来自本次对话或用户提供、并确认“Are you sure you want to cancel order ?”后调用;该工具仍在逐步推出,若 success: false 应引导用户使用 Swiggy 应用或致电 080-67466729。
失败处理:时段不可用则重新获取时段并提供替代;餐厅不可预订则建议到店或改用 Food 下单;预订窗口关闭则给出下一个可用日期;book_table 返回 5xx 时先 get_booking_status 再考虑重试(非幂等)。
限制:付费预订必须经 create_cart 与 UPI 完成,PENDING_PAYMENT 不等于确认;取消功能尚未全面可用。