book_table

Swiggy Dineout (Reservations): Book a table at a restaurant for a specific time slot. Only supports FREE reservations (isFree=true, bookingPrice=0). Paid deals will be rejected. Creates a cart then p...

Swiggy Dineout (Reservations): Book a table at a restaurant for a specific time slot. Supports both FREE reservations and paid UPI prebook deals. Creates a cart then proceeds with checkout. Requires slot details from get_available_slots: - slotId: From slot.deals[].slotId - itemId: From slot.deals[].itemId - reservationTime: From slot.reservationTime Returns booking confirmation with order ID. For paid deals, call create_cart → get_payment_options → book_table with paymentMethod="UPI". Example: "Book a table for 4 people at 7 PM" → Call with restaurant ID, slot details, guest count, and coordinates.

See book_table in actionComing soon

Example

const result = await client.callTool({
  name: "book_table",
  arguments: {
    restaurantId: "rest_42",
    slotId: 4242,
    itemId: "rest_42-ticket_7",
    reservationTime: 1735675200,
    guestCount: 2,
    latitude: 12.9716,
    longitude: 77.5946,
  },
});

Parameters

ParameterTypeRequiredDescription
restaurantIdstringyesRestaurant ID
slotIdnumberyesSlot ID from selected slot (slot.deals[].slotId)
itemIdstringyesDeal/ticket item ID (slot.deals[].itemId, format: "restaurantId-ticketId")
reservationTimenumberyesUnix timestamp from selected slot (slot.reservationTime)
guestCountnumberyesNumber of guests (1-20)
latitudenumberyesLatitude from user address
longitudenumberyesLongitude from user address
paymentMethodstringnoOmit (or "Cash") for FREE reservations. Use "UPI" for paid prebook deals — then also pass cartKey and intentApp (or generateUPIQR).
cartKeystringnoPaid UPI prebook only: the cartKey returned by create_cart (DEAL_TICKET_PURCHASE). Required for the paid flow.
intentAppstringnoPaid UPI prebook only: the UPI app id chosen from get_payment_options. Omit when generateUPIQR=true.
generateUPIQRbooleannoPaid UPI prebook on desktop: set true for a scannable QR instead of an app intent (no intentApp).

Free reservations take only the reservation fields above. The paid UPI flow is create_cartget_payment_optionsbook_table with paymentMethod="UPI" + cartKey + (intentApp or generateUPIQR).

Session credentials (user identity, access token) are supplied automatically by the authenticated MCP session - you do not pass them in the tool call. See Authenticate.

Response

Free reservation — success

{
  "success": true,
  "data": {
    "isDineout": true,
    "orderId": "string",
    "status": "CONFIRMED",
    "restaurantName": "string",
    "restaurantLocation": "string",
    "reservationDate": "string",
    "reservationTime": "string",
    "guestCount": 2
  },
  "booking": { /* back-compat alias — same as data */ },
  "message": "string"
}
  • booking at the top level is a back-compat alias mirroring data. Use data in new code.

Free reservation — failure

{
  "success": false,
  "booking": null,
  "error": "description of what went wrong"
}

Note: error is a plain string, not { message: string }. Read response.error directly.

Duplicate booking failure (same booking attempted twice)

{
  "success": false,
  "booking": null,
  "error": "deal already purchased",
  "hint": "This error typically means the booking was already completed successfully...",
  "possibleDuplicateRequest": true
}
  • hint — human-readable explanation, useful to surface to the user.
  • possibleDuplicateRequest: true — signals the LLM/agent should check get_booking_status before retrying.

Order enters PENDING_PAYMENT. Poll check_payment_status with paasId + orderId.

{
  "success": true,
  "data": {
    "orderId": "string",
    "transactionId": "string",
    "paasId": "string",
    "upiIntentUrl": "upi://pay?...",
    "bridgeUrl": "https://mcp.swiggy.com/deeplink-redirect?link=...",
    "isQrFlow": false,
    "pollingIntervalInMs": 3000,
    "maxTimeToPollForInMs": 300000,
    "paymentMethod": "UPI",
    "status": "PENDING_PAYMENT",
    "isDineout": true,
    "restaurantName": "string",
    "restaurantLocation": "string",
    "reservationDate": "string",
    "reservationTime": "string",
    "guestCount": 2
  },
  "message": "⏳ PENDING_PAYMENT — ..."
}
  • status: "PENDING_PAYMENT" — booking not confirmed yet; payment in progress.
  • paasId — required for check_payment_status.
  • orderId — required for confirm_order.
  • upiIntentUrl / bridgeUrl / isQrFlow — use to route the user to their UPI app.
{
  "success": false,
  "error": { "message": "description of what went wrong" }
}

See Error codes for the full catalogue.

Details

FieldValue
Namebook_table
MCP ServerDineout
EndpointPOST mcp.swiggy.com/dineout
StageReserve
Behaviourmutating

Next in this journey →

Continue with get_booking_status.