DEV Community

Tej Pandya
Tej Pandya

Posted on AI-assisted

Make Your Store Callable by AI Assistants: A Feed and Tool Contract Sketch

If an assistant is going to buy from you, two things must be machine-readable: what you sell (the feed) and what the assistant may do (the tool). This post sketches both. It is a design sketch, not a copy of any platform spec.

The seller here is an illustrative shoe retailer, not a customer story.

Part 1: the feed

OpenAI's product feed docs describe structured catalog data that lets ChatGPT show products with accurate pricing, availability and seller context. Google's UCP guide says it builds on existing Merchant Center shopping feeds. So start with clean rows:

{
  "id": "shoe-123-42",
  "title": "Trail runner, size 42",
  "price": {"amount": "89.00", "currency": "EUR"},
  "availability": "in_stock",
  "seller": {"name": "Example Shoes", "return_days": 30},
  "url": "https://example.com/p/shoe-123"
}
Enter fullscreen mode Exit fullscreen mode

Check your platform's own schema for the real field names. Treat the sketch above as a shape, not a spec.

Part 2: the tool contract

Apps in ChatGPT are built on the open Model Context Protocol, so a tool is a name, a typed input and a typed result.

from pydantic import BaseModel

class BuyShoe(BaseModel):
    product_id: str
    quantity: int
    idempotency_key: str     # same key, same order, no double charge
    buyer_approved: bool     # a person said yes

def buy_shoe(req: BuyShoe):
    if not req.buyer_approved:
        return {"status": "needs_approval"}
    return create_order_once(req)
Enter fullscreen mode Exit fullscreen mode

Two choices matter. The idempotency key stops a retry from ordering twice. The approval flag keeps a human in the loop, which matters because most purchases will still need approval.

Part 3: who stays responsible

Google states that under UCP the merchant stays the Merchant of Record. Your order, refund and customer records stay yours, so your tool should write them the same way as a website order.

What to verify before building

  • Is your region, plan and industry supported? Announcements name specific surfaces and markets.
  • What are the fees and review steps? I did not verify them.
  • Does the platform's ranking favor you? Unknown.

Next step

Ship the feed first. It helps in any channel. Then add one tool, with a key and an approval step, and watch the logs.

Tej Pandya, founder of GrowEasy.ai.

Top comments (0)