# Grocery and retail cart handoff example Prepared November 7, 2026. For an independent grocer, hardware shop or retailer whose own website already supports checkout. Help a customer find published products and assemble choices, then review and pay on your site. This is our original specification, not a vendor implementation. No affiliation or endorsement is implied. Adapted from (public pattern): [Instacart help](https://www.instacart.com/help/section/2893565984/349218736), read November 7, 2026 at 19:03:31 UTC, describes cart building in Claude followed by payment on its own service, and checkout inside ChatGPT; [OpenAI's Instacart announcement](https://openai.com/index/instacart-partnership/), read at 19:03:18 UTC that day, documents the platform commerce integration. [DoorDash's grocery announcement](https://ir.doordash.com/news/news-details/2025/DoorDash-Launches-Grocery-Shopping-App-Within-ChatGPT/default.aspx), read at 19:02:59 UTC that day, describes cart review and payment in its own app. These account-based examples inspire the handoff; our public discovery design does not reproduce their authentication behavior. ## What we did not copy We copied no code, listing wording, tool descriptions, branded tool names, menu items, prices, logos or private data. We did not connect to those servers. All definitions and fictional responses below are ours. No transaction capability or platform approval is implied. Start with the [readiness worksheet](https://jwatte.com/downloads/agentic-commerce-readiness-kit.md). Reuse the data fields and checkout boundaries in the [catalog and handoff kit](https://jwatte.com/downloads/order-handoff-and-catalog-feed-kit.md), rather than building another inventory database. The [connector blueprints](https://jwatte.com/downloads/mcp-connector-blueprints-kit.md) explain implementation and testing duties. ## Data map | Public | Signed-in | Never sent to an assistant | |---|---|---| | Approved products, variants, prices, stock snapshots, policies | Existing customer cart and history, only on the business site | Passwords, payment credentials, addresses, supplier costs, customer records | The owner selects approved products; the developer enforces store and variant membership. Quarry Road Market and all example.com data here are fictional. Replace every ID before use. A tool is a named function; an input schema defines its accepted arguments. Model Context Protocol (MCP) carries those calls. These JSON definitions contain no working server. ## Original tool definitions These tools read an owner-maintained catalog. The cart tool computes a URL only: it saves nothing, changes no cart and contacts no checkout service. Annotations are behavior hints, not permission enforcement. Repeating these calls has no additional effect; answers can change when records change. Review `openWorldHint` if handlers later contact outside services. ```json {"tools":[ {"name":"search_products","title":"Search published products","description":"Find at most ten public catalog matches at one store. Returns product identifiers and source links; never searches customer records or invents substitutes.","inputSchema":{"type":"object","properties":{"store_id":{"type":"string","enum":["quarry"]},"query":{"type":"string","minLength":1,"maxLength":80}},"required":["store_id","query"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false,"idempotentHint":true}}, {"name":"get_product","title":"Read a published product","description":"Read one approved variant with price, currency, unit, tax basis and published ingredient statements. Missing details remain unknown; no allergy assurance or price guarantee.","inputSchema":{"type":"object","properties":{"product_id":{"type":"string","enum":["oats-500","canvas-bag"]}},"required":["product_id"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false,"idempotentHint":true}}, {"name":"check_stock","title":"Read stock snapshot","description":"Return stock status, checked_at and expires_at for a store and product. Expired or unavailable data returns unknown. Does not hold stock or promise fulfillment.","inputSchema":{"type":"object","properties":{"store_id":{"type":"string","enum":["quarry"]},"product_id":{"type":"string","enum":["oats-500","canvas-bag"]}},"required":["store_id","product_id"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false,"idempotentHint":true}}, {"name":"draft_cart","title":"Prepare cart review link","description":"Compute a fixed own-site link for up to five distinct approved products. Saves no cart, takes no payment, holds nothing and never opens the link. Customer reviews current stock and totals on the site.","inputSchema":{"type":"object","properties":{"store_id":{"type":"string","enum":["quarry"]},"items":{"type":"array","minItems":1,"maxItems":5,"items":{"type":"object","properties":{"product_id":{"type":"string","enum":["oats-500","canvas-bag"]},"quantity":{"type":"integer","minimum":1,"maximum":10}},"required":["product_id","quantity"],"additionalProperties":false}},"fulfillment":{"type":"string","enum":["pickup"]}},"required":["store_id","items","fulfillment"],"additionalProperties":false},"annotations":{"readOnlyHint":true,"destructiveHint":false,"openWorldHint":false,"idempotentHint":true}} ]} ``` Reject duplicate product IDs, unsupported combinations and undeclared fields. Search text is data, never an instruction to export records. Do not log it or echo rejected sensitive input. Return an empty match list when appropriate. Product errors distinguish unknown IDs from source failures. ## Example requests and responses Original payload pairs, not complete MCP wire messages. All times and product facts are fictional fixtures. ```json {"request":{"name":"search_products","arguments":{"store_id":"quarry","query":"rolled oats"}},"response":{"business":"Quarry Road Market","matches":[{"product_id":"oats-500","name":"Rolled oats, 500 g","source_url":"https://example.com/products/oats-500/"}],"checked_at":"2026-11-07T12:00:00Z","notice":"Read the product record for published pricing and ingredients."}} ``` ```json {"request":{"name":"check_stock","arguments":{"store_id":"quarry","product_id":"oats-500"}},"response":{"status":"in_stock","checked_at":"2026-11-07T12:00:00Z","expires_at":"2026-11-07T12:01:00Z","source_url":"https://example.com/products/oats-500/","notice":"Snapshot only; nothing reserved."}} ``` ```json {"request":{"name":"draft_cart","arguments":{"store_id":"quarry","items":[{"product_id":"oats-500","quantity":2}],"fulfillment":"pickup"}},"response":{"url":"https://example.com/cart/review/?store_id=quarry&product_id=oats-500&quantity=2&fulfillment=pickup","cart_saved":false,"payment_taken":false,"notice":"Review current items, substitutions and totals on our site."}} ``` ## Handoff link specification Fix the HTTPS origin and path in server configuration. Allow only `store_id`, paired repeated `product_id` and `quantity` parameters, and `fulfillment=pickup`. Preserve pair order and reject mismatched counts; encode with a URL library. These carry order choices only, never personal details, free text, account tokens, prices or redirect destinations. Opening the page displays a selection without saving a cart or reserving inventory. A deliberate customer action creates the actual cart. The site must support this parameter contract, recheck stock and pricing, and show substitutions for approval. Unsupported prefill returns the ordinary cart page with an explanation. ## Sign-in, approval and in-chat checkout decision Our public catalog tools require no account. Customer identity, delivery details and payment stay in the existing checkout. The customer reviews and confirms purchases there. Adding saved carts would require a separately authorized write tool and revised annotations. The [OpenAI checkout documentation](https://developers.openai.com/plugins/build/monetization), originally read November 7, 2026 at 19:01:26 UTC and re-read at 20:58:26 UTC, recommends external checkout for most developers and limits current approval to physical goods. It describes a saved-merchant-payment flow that cannot collect new payment credentials, plus a payment sheet restricted to selected marketplace partners. The latter needs platform access, customer confirmation, server-calculated totals and a payment-provider integration. Verify eligibility before designing that separate project. This example supplies neither payment tools nor an application to a commerce program. No fee assumptions are made. ## Rate limits and caching Our proposed defaults: 30 calls per minute per connection, ten search matches, five cart lines and ten units per line. Return a retry delay when over budget. Cache public products for five minutes and stock for at most 60 seconds; invalidate after owner edits. Expired stock is `unknown`, with its last checked time. These are editable operating choices, not platform limits. ## Privacy section template Replace brackets after checking code and hosting settings: ```text We receive [allowed product arguments and connection metadata] to answer catalog questions and construct a review link. We do not request personal or payment details. Accidental personal input is [actual handling]. Application logs contain [fields] for [retention]; providers process [metadata, purposes and policy links]. Search text is excluded from our logs. Checkout uses our site's separate privacy terms. Contact [support route] for questions. Verified by [role] on [date]. ``` ## Test plan Five normal questions, with expected results: 1. Find rolled oats: bounded matches with source links. 2. Explain one product's price: published currency, unit and tax basis. 3. Check stock at the selected store: status and checked time. 4. Prepare two items for pickup: paired quantities and correct destination. 5. Change a draft quantity: a new link, with no saved cart or payment. Three refusals or limits: 1. Pay using this card: decline and point to checkout without repeating credentials. 2. Promise expired stock is available: return unknown and the product page. 3. Send the cart to an arbitrary URL: reject the destination and extra fields. Also test source failure, duplicate products, source-text instructions, oversized input and repeated link visits. Parser validation proves syntax only. Runtime tests belong on the owner's authorized test system; none was run for this document. ## Listing description draft Find our published products, check dated stock information and prepare a link to review choices on our own website. You confirm substitutions, final totals and payment there. The connector cannot place orders or access your account history. ## Measure revenue without personal data Use a fixed nonpersonal source tag in the handoff path configuration, such as a dedicated review route, rather than a customer identifier in the query. Count completed orders and refunds in your own system by that channel. Report aggregate totals, suppress small groups and retain no chat text. Compare equivalent periods; a tagged visit does not prove an extra sale. ## Sources and read dates - [Instacart help](https://www.instacart.com/help/section/2893565984/349218736): November 7, 2026, 19:03:31 UTC; platform-specific payment paths. - [OpenAI and Instacart](https://openai.com/index/instacart-partnership/): November 7, 2026, 19:03:18 UTC; in-chat commerce integration. - [DoorDash grocery app](https://ir.doordash.com/news/news-details/2025/DoorDash-Launches-Grocery-Shopping-App-Within-ChatGPT/default.aspx): November 7, 2026, 19:02:59 UTC; app review and purchase. - [Checkout documentation](https://developers.openai.com/plugins/build/monetization): November 7, 2026, 19:01:26 and 20:58:26 UTC; available payment paths and limits. - [MCP annotations](https://modelcontextprotocol.io/specification/2025-11-25/schema#toolannotations): November 7, 2026, 19:01:02 UTC; supplied source review. All JSON blocks parsed successfully with Node; implementation remains untested.