Book a table

Dineout journey - find a restaurant, check availability, reserve.

Dineout is Swiggy's table-reservation surface across 50+ Indian cities. The flow is compact: find → check slots → book → confirm.

The flow

search_restaurants_dineout ──► get_restaurant_details
                                        │
                                        ▼
                               get_available_slots ──► book_table ──► get_booking_status

Dineout search takes the coordinates of the city or area the user named. There is no saved-address lookup. If the user says "near me" without a place, ask which city or area.

const restaurants = await client.callTool({
  name: "search_restaurants_dineout",
  arguments: {
    latitude: 12.9716,
    longitude: 77.5946,
    query: "italian",
  },
});

Results include availability status, offers, cuisines, and price range. Filter to restaurants where availability is "AVAILABLE" before presenting.

Step 2 - Dig into details

const details = await client.callTool({
  name: "get_restaurant_details",
  arguments: { restaurantId: restaurants.data.restaurants[0].id },
});
// details.data: ratings, amenities, menu images, exclusive Dineout deals

Step 3 - Check available slots

const slots = await client.callTool({
  name: "get_available_slots",
  arguments: {
    restaurantId: details.data.id,
    date: "2026-05-01",
    guestCount: 4,
  },
});
// slots.data has 7-day forward availability, broken into breakfast/lunch/dinner bands

Surface slot times in the user's timezone (all restaurants are in India; IST applies).

Step 4 - Book

const booking = await client.callTool({
  name: "book_table",
  arguments: {
    restaurantId: details.data.id,
    slotId: slots.data.slots[0].slotId,
    guestCount: 4,
  },
});

Important: book_table is not idempotent. On 5xx, call get_booking_status with the restaurant and slot before retrying.

Step 5 - Confirm

const status = await client.callTool({
  name: "get_booking_status",
  arguments: { bookingId: booking.data.bookingId },
});

Send the user the confirmation number and the restaurant's address.

Agent prompt

Common errors

  • SLOT_UNAVAILABLE → slot filled; refetch availability and offer alternatives.
  • RESTAURANT_NOT_BOOKABLE → restaurant isn't Dineout-enabled; offer dine-in walk-in guidance or a Food order instead.
  • BOOKING_WINDOW_CLOSED → outside booking hours; present next available day.

Full catalogue: errors.