{
  "$schema": "https://static.modelcontextprotocol.io/schemas/v1/server-card.schema.json",
  "name": "com.apparel-monster/storefront",
  "version": "0.1.0",
  "title": "Apparel Monster Storefront",
  "description": "MCP server for Apparel Monster — AI shopping agents can browse 116 products across men's, women's, and sportswear, manage carts, apply promos, and initiate checkout. Supports MCP Apps (ui:// resources) for inline interactive UI rendering.",
  "instructions": "Apparel Monster is an online apparel retailer. Use the 8 tools to search the 116-product catalog, manage a cart, apply promos, and initiate checkout. Start with list_categories to see the 30 taxons (Men / Women / Sportswear + promotions), then search_products with a query, taxon permalink, or price range. Use get_product to inspect variants (sizes/colors) before add_to_cart. For anonymous guest checkout, the server automatically creates an order_token on first cart operation; pass it with X-Spree-Order-Token in REST fallback calls. Cart mutations (add_to_cart, apply_coupon, go_to_checkout) should confirm with the user before acting. Rate limits: 60 requests per 60 seconds per client; honor X-RateLimit-* headers and Retry-After on 429. Errors are structured JSON with error/code/message/retry_after_seconds fields.",
  "serverUrl": "https://dfe0ea20ac20.agentic.checkouttools.com/mcp",
  "websiteUrl": "https://spree.apparel.monster/",
  "repository": {
    "url": "https://github.com/spree/spree",
    "source": "github"
  },
  "remotes": [
    {
      "type": "streamable-http",
      "url": "https://dfe0ea20ac20.agentic.checkouttools.com/mcp",
      "supportedProtocolVersions": ["2025-03-12", "2025-06-15", "2025-11-05"]
    }
  ],
  "capabilities": {
    "tools": { "listChanged": true },
    "resources": { "listChanged": true, "subscribe": false },
    "prompts": { "listChanged": true },
    "apps": {
      "enabled": true,
      "supportedMimeTypes": ["text/html;profile=mcp-app"]
    }
  },
  "resources": [
    {
      "uri": "ui://apparel-monster/product-card",
      "name": "Product card UI",
      "description": "Inline product card renderer with image, title, price, add-to-cart button.",
      "mimeType": "text/html;profile=mcp-app"
    },
    {
      "uri": "ui://apparel-monster/cart-summary",
      "name": "Cart summary UI",
      "description": "Interactive cart summary with line items, quantities, and totals. Supports in-conversation quantity updates.",
      "mimeType": "text/html;profile=mcp-app"
    },
    {
      "uri": "ui://apparel-monster/search-results",
      "name": "Search results UI",
      "description": "Grid-style search results with filterable thumbnails, prices, and availability badges.",
      "mimeType": "text/html;profile=mcp-app"
    }
  ],
  "tools": [
    {
      "name": "search_products",
      "description": "Search the catalog by keyword, taxon (category) permalink, price range, in-stock flag, and sort order. Returns up to 20 products with name, slug, price, and URL.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query":     { "type": "string", "description": "Keyword" },
          "taxon":     { "type": "string", "description": "Permalink, e.g. categories/men/shirts" },
          "min_price": { "type": "number" },
          "max_price": { "type": "number" },
          "in_stock":  { "type": "boolean", "default": true },
          "sort":      { "type": "string", "enum": ["popularity","-popularity","price","-price","name","-name","-available_on"] },
          "limit":     { "type": "integer", "minimum": 1, "maximum": 20, "default": 10 }
        }
      },
      "annotations": { "readOnlyHint": true, "destructiveHint": false, "idempotentHint": true, "openWorldHint": true },
      "_meta": { "ui": { "resourceUri": "ui://apparel-monster/search-results" } }
    },
    {
      "name": "get_product",
      "description": "Fetch full details for a product by slug, including variants (sizes/colors) and per-variant stock.",
      "inputSchema": {
        "type": "object",
        "properties": { "slug": { "type": "string" } },
        "required": ["slug"]
      },
      "annotations": { "readOnlyHint": true, "destructiveHint": false, "idempotentHint": true, "openWorldHint": true },
      "_meta": { "ui": { "resourceUri": "ui://apparel-monster/product-card" } }
    },
    {
      "name": "list_categories",
      "description": "Return the taxonomy — top-level and nested categories (30 taxons total across Men, Women, Sportswear, plus promotional groupings).",
      "inputSchema": {
        "type": "object",
        "properties": {
          "parent": { "type": "string", "description": "Permalink of the parent taxon to list children of, e.g. 'categories/men'." },
          "depth":  { "type": "integer", "minimum": 0, "maximum": 4, "default": 2, "description": "Max depth of nested categories to return." }
        }
      },
      "annotations": { "readOnlyHint": true, "destructiveHint": false, "idempotentHint": true, "openWorldHint": true }
    },
    {
      "name": "view_cart",
      "description": "Return the current cart (line items, quantities, totals, applied promos). Auto-creates an empty cart with a new order_token if none exists.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "order_token": { "type": "string", "description": "Optional cart identifier. If omitted, uses the server-held session cart." }
        }
      },
      "annotations": { "readOnlyHint": true, "destructiveHint": false, "idempotentHint": true },
      "_meta": { "ui": { "resourceUri": "ui://apparel-monster/cart-summary" } }
    },
    {
      "name": "add_to_cart",
      "description": "Add a product variant to the cart. Requires user confirmation.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "variant_id": { "type": "integer" },
          "quantity":   { "type": "integer", "minimum": 1, "maximum": 10, "default": 1 }
        },
        "required": ["variant_id"]
      },
      "annotations": { "readOnlyHint": false, "destructiveHint": false, "idempotentHint": false },
      "_meta": { "ui": { "resourceUri": "ui://apparel-monster/cart-summary" } }
    },
    {
      "name": "apply_coupon",
      "description": "Apply a promotion/discount code to the current cart.",
      "inputSchema": {
        "type": "object",
        "properties": { "coupon_code": { "type": "string" } },
        "required": ["coupon_code"]
      },
      "annotations": { "readOnlyHint": false, "destructiveHint": false, "idempotentHint": true },
      "_meta": { "ui": { "resourceUri": "ui://apparel-monster/cart-summary" } }
    },
    {
      "name": "go_to_checkout",
      "description": "Navigate the current tab to /checkout for the active cart. Requires user confirmation.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "return_url": { "type": "string", "format": "uri", "description": "Optional URL to redirect to after order completion." }
        }
      },
      "annotations": { "readOnlyHint": false, "destructiveHint": true, "idempotentHint": false }
    },
    {
      "name": "get_store_info",
      "description": "Return the store name, currency, API base URL, and pointers to every /.well-known/ discovery endpoint.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "include_discovery": { "type": "boolean", "default": true, "description": "Include the list of /.well-known/ endpoints." }
        }
      },
      "annotations": { "readOnlyHint": true, "destructiveHint": false, "idempotentHint": true }
    }
  ],
  "_meta": {
    "apparel-monster.storefront":         "https://spree.apparel.monster",
    "apparel-monster.api_base":           "https://spree.apparel.monster/api/v2/storefront",
    "agentic-commerce.ucp_discovery":     "https://dfe0ea20ac20.agentic.checkouttools.com/.well-known/ucp"
  }
}
