create_address

Swiggy (Instamart/Food): Create a new delivery address for the authenticated user.

📍 WORKFLOW - What to ASK the user:

  1. Ask: "What is your complete delivery address?" (Get the full address as a single string)
  2. Ask: "What is your name?"
  3. Ask: "What is your phone number?"
  4. Ask: "What type of address is this?" (Options: HOME, WORK, OFFICE, FRIENDS_AND_FAMILY, or OTHER)
  5. Ask (optional): "Would you like to give a name/label to this address?" (e.g., "My Home", "Office")
  6. Ask: "Is this address for you or someone else?"
    • If for someone else: Ask for the receiver's name and phone number

🤖 AUTOMATIC PARSING - What YOU must do (DO NOT ask user for these): After getting the full address, YOU must automatically parse it and extract:

  • addressLine: Main street/building/house number (REQUIRED - extract from full address)
  • addressLine2: Apartment/floor/wing/additional details (REQUIRED - extract from full address)
  • city: City name (REQUIRED - extract from full address)
  • postalCode: Postal/ZIP code (REQUIRED - extract from full address)
  • locality: Area/neighborhood (optional - extract if available)

🗺️ COORDINATES: latitude and longitude are optional. If omitted, they are auto-resolved from the address automatically.

⚠️ CRITICAL RULES:

  • NEVER ask the user to provide addressLine, addressLine2, city, or postalCode separately
  • YOU parse the full address and extract these components automatically
  • The user provides: full address, name, phone, address type, optional tag, and receiver details if applicable
  • Account details (userName, userPhone) are ALWAYS the authenticated user
  • Receiver details (receiverName, receiverPhone) are only used when delivering to someone else
See create_address in actionComing soon

Example

const result = await client.callTool({
  name: "create_address",
  arguments: {
    fullAddress: "...",
    addressLine: "...",
    addressLine2: "...",
    city: "Bengaluru",
    postalCode: "...",
    addressCategory: "HOME",
    userName: "...",
    userPhone: "...",
  },
});

Parameters

ParameterTypeRequiredDescription
fullAddressstringyesComplete address as provided by the user
addressLinestringyesMain street/building/house number (REQUIRED)
addressLine2stringyesApartment, floor, wing, or additional details (REQUIRED - extract from full address, use empty string "" if not found)
localitystringnoArea, neighborhood, or locality name (optional)
citystringyesCity name (REQUIRED)
postalCodestringyesPostal/ZIP code (REQUIRED)
latitudenumbernoLatitude coordinate of the address (optional - auto-resolved from address if omitted)
longitudenumbernoLongitude coordinate of the address (optional - auto-resolved from address if omitted)
addressCategory"HOME" | "WORK" | "OFFICE" | "FRIENDS_AND_FAMILY" | "OTHER"yesType of address: HOME, WORK, OFFICE, FRIENDS_AND_FAMILY, or OTHER (REQUIRED)
addressTagstringnoFriendly name/label for the address (e.g., "My Home", "Office", "Mom's Place") (optional)
userNamestringyesAccount holder name (authenticated user) (REQUIRED)
userPhonestringyesAccount holder phone number (authenticated user) (REQUIRED)
receiverNamestringnoReceiver name if delivering to someone else (optional)
receiverPhonestringnoReceiver phone if delivering to someone else (optional)

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

All Swiggy MCP tools return:

{
  "success": true,
  "data": { /* tool-specific payload */ },
  "message": "optional human-readable message"
}

On failure:

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

See Error codes for the full catalogue.

Output schema

data: {
  addressId: string;
}

This schema documents the structured payload returned by create_address. Optional fields can vary by user state, cart state, and live Swiggy availability.

Schema notes

  • addressId: stable identifier for a saved Swiggy delivery address. Use the returned ID in cart, checkout, and payment calls instead of reusing the human-readable address text.
  • Fields marked optional may be omitted depending on user state, cart/order state, and live Swiggy availability.
  • Use returned identifiers and enum values exactly as provided; do not invent fallback IDs, status values, payment methods, or timestamps.

Details

FieldValue
Namecreate_address
MCP ServerInstamart
EndpointPOST mcp.swiggy.com/im
StageDiscover
Behaviourmutating

Next in this journey →

Continue with search_products.