swiggy-mcp-instamart
get_addresses → your_go_to_items | search_products → update_cart → get_cart
→ list_coupons / apply_coupon → get_payment_options → checkout → track_order
Step rules
get_addressesonce; passaddressIdto every search. Stock and serviceability are per address, so a search without it is meaningless.create_addressif none fits (ask only for full address, name, phone, category; no coordinates).- Returning user?
your_go_to_items { addressId }first. One call replaces 3–5 searches and is what Swiggy recommends for reorders. search_products { addressId, query }returns products withvariations[]. The cart takes the variation ids:spinId(+skuId), neverproductId. CheckisInStockAndAvailableandmaxQuantitybefore offering a variation. ShowsimilarProductsin a separate section when present. Paginate withnextOffset.update_cartREPLACES the whole cart.update_cart { selectedAddressId, items: [{ spinId, skuId, quantity }] }must contain every item the user wants, not just the new one. To add one item:get_cart, merge, send the full list. The response may includeremovedOutOfStockItemsandreducedQuantityItems— tell the user about each with itsreason.- Show the cart after every change:
get_cart→items[],billBreakdown.toPay,unserviceableItems,cartWarning. Read the cart again before checkout. - Do not switch address mid-cart. Carts bind to the delivery address; call
clear_cartfirst, then rebuild at the new address. - Coupons:
list_coupons { addressId }thenapply_coupon { couponCode }(case-insensitive). Report savings only from the returned cart. These two tools andget_order_detailsare rolled out per account (absent fromtools/listfor some users as of 2026-09-05); use only the tools the server lists, and say so if they are missing. - Before
checkout: state items,billBreakdown.toPay, the exact delivery address, the payment method, and — if the cart spans multiple stores — "Your cart contains items from N stores; Swiggy will create one order per store." Ask "Do you want to proceed with placing this order to this address?" and wait for a clear yes. Minimum order ₹99. - Place:
checkout { addressId, paymentMethod?, intentApp?, generateUPIQR? }.paymentMethodis a GROUP —"UPI","Cash"/"COD","SwiggyPay"— never an app id; the app id goes inintentAppwithpaymentMethod: "UPI". Cash → placed; usemessageverbatim ("Instamart order placed successfully"). UPI →PENDING_PAYMENT, not placed yet →swiggy-mcp-payments(Instamart confirms withorderId + paasId). Report multi-store results per order. - Track:
track_order { orderId, lat, lng }— coordinates are required; take them from the address/order context. RespectpollingIntervalSeconds, never faster than 10 s.get_delivery_status { orderId, addressId }for structured ETA. History:get_orders { count?, orderType?, activeOnly? }; details:get_order_details { orderId }. - Cancellation: no tool; say "To cancel your order, please call Swiggy customer care at 080-67466729."
Failure → response
- Item out of stock at this address → suggest alternatives from a new
search_products. - Address not serviceable → ask for another address (or offer Food delivery instead).
- Minimum order not met → ask the user to add items.
- Cart expired → rebuild from the user's confirmed list, confirm, then continue.
- 5xx on
checkout→get_orders { activeOnly: true }before any retry.
Agent prompt
You help users shop on Swiggy Instamart. Resolve the saved address first. Offer
your_go_to_itemsfor reorders; usesearch_productsfor new items; add variationspinIds.update_cartreplaces the cart, so always send the full list. Show the cart and total, get an explicit yes beforecheckout, and never announce success on aPENDING_PAYMENTresponse.