Skip to content

Comments

Add product availability check across multiple locations#2

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-product-availability-check
Draft

Add product availability check across multiple locations#2
Copilot wants to merge 3 commits intomainfrom
copilot/add-product-availability-check

Conversation

Copy link

Copilot AI commented Feb 8, 2026

Enables checking product availability across different pincodes without permanently changing the user's delivery location.

Implementation

Search Service (src/order/services/search.py)

  • Added check_product_availability_at_location() - temporarily sets location, searches product, captures store status (open/closed/unavailable) and available products

BlinkitOrder (src/order/blinkit_order.py)

  • Added check_product_availability() - iterates through location list, aggregates results

MCP Tool (src/server.py)

  • Added check_availability_across_locations - exposes functionality to Claude with formatted output showing per-location availability and summary statistics

Usage

# User asks Claude:
"Check if Amul milk is available in Mumbai 400001, Delhi 110001, Bangalore 560001"

# Returns:
# Location: Mumbai 400001
#   Store Status: open
#   Available: Yes
#   Products Found: 3
# ...
# Summary: Product available in 2/3 locations

Approach: Sequentially changes location context for each pincode, performs search, restores state. Single-threaded execution prevents race conditions.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: /usr/bin/curl curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Product availability check</issue_title>
<issue_description>Can we able to check product availability across different pincode?

May be check across serviceable pincode across selected state</issue_description>

Comments on the Issue (you are @copilot in this section)

@hereisSwapnil How does it work, I means corrently it works based on your location?

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 8, 2026 13:53
Co-authored-by: hereisSwapnil <85278243+hereisSwapnil@users.noreply.github.com>
Co-authored-by: hereisSwapnil <85278243+hereisSwapnil@users.noreply.github.com>
Copilot AI changed the title [WIP] Add product availability check across serviceable pincodes Add product availability check across multiple locations Feb 8, 2026
Copilot AI requested a review from hereisSwapnil February 8, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Product availability check

2 participants