{
  "name": "com.antistagflation/shop",
  "title": "AntiStagFlation Shop",
  "version": "1.0.0",
  "description": "Groceries & everyday essentials in warehouse pack sizes, free US shipping, order via your AI assistant with Shop Pay checkout.",
  "websiteUrl": "https://shop.antistagflation.com/",
  "documentationUrl": "https://shop.antistagflation.com/agents",
  "supportedProtocolVersions": [
    "2024-11-05"
  ],
  "remotes": [
    {
      "type": "streamable-http",
      "url": "https://mcp.antistagflation.com/mcp",
      "headers": [
        {
          "name": "Authorization",
          "value": "Bearer <your API key>",
          "description": "API key with the shop scope; register free and create one on the account page.",
          "isRequired": true,
          "isSecret": true
        }
      ]
    }
  ],
  "serverInfo": {
    "name": "shop",
    "title": "AntiStagFlation Shop",
    "version": "1.0.0",
    "description": "Groceries & everyday essentials in warehouse pack sizes, free US shipping, order via your AI assistant with Shop Pay checkout.",
    "websiteUrl": "https://shop.antistagflation.com/"
  },
  "transport": {
    "type": "streamable-http",
    "url": "https://mcp.antistagflation.com/mcp"
  },
  "authentication": {
    "required": true,
    "schemes": [
      "bearer"
    ],
    "description": "Send 'Authorization: Bearer <API key>'. Keys start with grc_. Register free at https://grocery.antistagflation.com/account and create a key with the shop scope."
  },
  "tools": [
    {
      "name": "lookup_sku",
      "description": "按 SKU 精确查一件商品（名称、价格；Key 带 shelf 权限时含库位）。store 可选 costco（默认）、shoprite、bjs、restaurant-depot、stop-and-shop、aldi、cvs、walgreens、petco、staples。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "store": {
            "type": "string"
          },
          "sku": {
            "type": "string"
          }
        },
        "required": [
          "sku"
        ]
      }
    },
    {
      "name": "search_products",
      "description": "按名称关键词搜商品（子串匹配），返回最多 limit 件。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "q": {
            "type": "string"
          },
          "limit": {
            "type": "number"
          }
        },
        "required": [
          "q"
        ]
      }
    },
    {
      "name": "shop_list_items",
      "description": "列出已授权正在销售的商品（购物专用，只认本站自有 12 位商品编号 product_id，商家 SKU/UPC 在购物里一律不认）。limit 每页最多 50（默认 20），offset 翻页。返回含 price（结算价）、available（可买数量）、in_stock。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number",
            "description": "每页件数，1–50，默认 20"
          },
          "offset": {
            "type": "number",
            "description": "从第几件开始，默认 0"
          }
        }
      }
    },
    {
      "name": "shop_search",
      "description": "用自然语言在购物目录里搜已授权在售商品（混合搜索：语义向量＋全文检索；只认购物目录，不返采集数据，未授权/未上架商品不会出现）。中英文自然语言都可，返回按相关度排序，含 product_id、price（结算价）、available 与 matched_via（命中来源：semantic/fts），meta.semantic 标明语义是否启用。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "想找的商品描述，如 peanut butter、unsalted cashews、无盐腰果"
          },
          "limit": {
            "type": "number",
            "description": "最多返回几件，1–20，默认 10"
          }
        },
        "required": [
          "query"
        ]
      }
    },
    {
      "name": "shop_get_item",
      "description": "按自有商品编号 product_id 查一件在售商品；未授权销售、未上架或已下架的商品会被统一屏蔽，回 not_sellable，不泄露价格与库存。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "product_id": {
            "type": "string",
            "description": "本站自有 12 位连串商品编号"
          }
        },
        "required": [
          "product_id"
        ]
      }
    },
    {
      "name": "shop_create_cart",
      "description": "新建一个购物购物车。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {}
      }
    },
    {
      "name": "shop_add_to_cart",
      "description": "把在售商品加入购物车（product_id 为自有商品编号）。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cart_id": {
            "type": "number"
          },
          "product_id": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          }
        },
        "required": [
          "cart_id",
          "product_id"
        ]
      }
    },
    {
      "name": "shop_update_cart_item",
      "description": "改购物车里某件商品的数量（0 为移除）。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cart_id": {
            "type": "number"
          },
          "product_id": {
            "type": "string"
          },
          "qty": {
            "type": "number"
          }
        },
        "required": [
          "cart_id",
          "product_id",
          "qty"
        ]
      }
    },
    {
      "name": "shop_remove_from_cart",
      "description": "从购物车移除一件商品。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cart_id": {
            "type": "number"
          },
          "product_id": {
            "type": "string"
          }
        },
        "required": [
          "cart_id",
          "product_id"
        ]
      }
    },
    {
      "name": "shop_get_cart",
      "description": "看购物车内容与小计。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cart_id": {
            "type": "number"
          }
        },
        "required": [
          "cart_id"
        ]
      }
    },
    {
      "name": "shop_prepare_checkout",
      "description": "结账确认（下单前必经一步）：算清逐件价、运费、税费与总计，返回 human_summary 摘要供人看清拍板，并发一次性确认码 checkout_token（10 分钟有效、单次使用、与金额绑定；价格或库存变化后下单会被拦下要求重新确认）。地址只收美国 50 州+DC 街道地址，领地/军事地址/纯 P.O. Box 会被拒并说明原因。substitution_policy 缺货策略：ask=先问本人（默认，不擅自替换）、refund=缺货退款。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cart_id": {
            "type": "number"
          },
          "address": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "street": {
                "type": "string"
              },
              "city": {
                "type": "string"
              },
              "state": {
                "type": "string",
                "description": "二字母州代码"
              },
              "zip": {
                "type": "string"
              }
            },
            "required": [
              "name",
              "street",
              "city",
              "state",
              "zip"
            ]
          },
          "substitution_policy": {
            "type": "string",
            "enum": [
              "ask",
              "refund"
            ],
            "description": "缺货策略，默认 ask"
          }
        },
        "required": [
          "cart_id",
          "address"
        ]
      }
    },
    {
      "name": "shop_place_order",
      "description": "用结账确认码下单（必须带 idempotency_key 防重复：同一 Key 重复提交只回原来那一单）。订单状态停在 created（待付款），现在不会扣款，付款通道开通后另行通知；库存会预留，未发货前可取消。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "cart_id": {
            "type": "number"
          },
          "checkout_token": {
            "type": "string",
            "description": "shop_prepare_checkout 返回的一次性确认码"
          },
          "idempotency_key": {
            "type": "string",
            "description": "防重复下单的唯一标记，重试时保持不变"
          }
        },
        "required": [
          "checkout_token",
          "idempotency_key"
        ]
      }
    },
    {
      "name": "shop_get_order",
      "description": "按订单号查自己的订单状态，返回里 next_steps 会说明下一步该做什么（待付款/已取消等）。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_no": {
            "type": "string"
          }
        },
        "required": [
          "order_no"
        ]
      }
    },
    {
      "name": "shop_cancel_order",
      "description": "取消自己未发货（created 待付款）的订单并释放预留库存；重复取消是安全的，会回已取消、不会重复释放库存。需要 shop 权限。",
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_no": {
            "type": "string"
          }
        },
        "required": [
          "order_no"
        ]
      }
    }
  ],
  "resources": [],
  "prompts": []
}