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.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
restaurantId | string | yes | Restaurant ID |
slotId | number | yes | Slot ID from selected slot (slot.deals[].slotId) |
itemId | string | yes | Deal/ticket item ID (slot.deals[].itemId, format: "restaurantId-ticketId") |
reservationTime | number | yes | Unix timestamp from selected slot (slot.reservationTime) |
guestCount | number | yes | Number of guests (1-20) |
latitude | number | yes | Latitude from user address |
longitude | number | yes | Longitude from user address |
paymentMethod | string | no | Omit (or "Cash") for FREE reservations. Use "UPI" for paid prebook deals — then also pass cartKey and intentApp (or generateUPIQR). |
cartKey | string | no | Paid UPI prebook only: the cartKey returned by create_cart (DEAL_TICKET_PURCHASE). Required for the paid flow. |
intentApp | string | no | Paid UPI prebook only: the UPI app id chosen from get_payment_options. Omit when generateUPIQR=true. |
generateUPIQR | boolean | no | Paid 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_cart → get_payment_options → book_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"
}
bookingat the top level is a back-compat alias mirroringdata. Usedatain new code.
Free reservation — failure
{
"success": false,
"booking": null,
"error": "description of what went wrong"
}
Note:
erroris a plain string, not{ message: string }. Readresponse.errordirectly.
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 checkget_booking_statusbefore retrying.
Paid UPI prebook — success
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 forcheck_payment_status.orderId— required forconfirm_order.upiIntentUrl/bridgeUrl/isQrFlow— use to route the user to their UPI app.
Paid UPI prebook — failure
{
"success": false,
"error": { "message": "description of what went wrong" }
}
See Error codes for the full catalogue.
Details
| Field | Value |
|---|---|
| Name | book_table |
| MCP Server | Dineout |
| Endpoint | POST mcp.swiggy.com/dineout |
| Stage | Reserve |
| Behaviour | mutating |
Next in this journey →
Continue with get_booking_status.