{
  "openapi": "3.1.0",
  "info": {
    "title": "Reccas Agent API",
    "version": "1.0.0",
    "description": "Public read-only fashion and outfit intelligence from Reccas, an AI wardrobe manager."
  },
  "servers": [
    { "url": "https://reccas.com" }
  ],
  "x-mcp-server": "https://reccas.com/_api/mcp",
  "paths": {
    "/_api/agent/search-outfits": {
      "get": {
        "operationId": "searchOutfits",
        "summary": "Search complete Reccas outfits",
        "parameters": [
          { "name": "query", "in": "query", "schema": { "type": "string", "maxLength": 200 } },
          { "name": "occasion", "in": "query", "schema": { "type": "string", "enum": ["wedding", "vacation", "date_night", "party", "work_event", "casual", "black_tie"] } },
          { "name": "maxBudget", "in": "query", "schema": { "type": "number", "minimum": 0 } },
          { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 10, "default": 5 } }
        ],
        "responses": {
          "200": {
            "description": "Matching complete outfits",
            "content": { "application/json": { "schema": { "type": "object", "properties": { "outfits": { "type": "array", "items": { "$ref": "#/components/schemas/Outfit" } } } } } }
          }
        }
      }
    },
    "/_api/agent/find-products": {
      "get": {
        "operationId": "findProducts",
        "summary": "Search the Reccas fashion catalog",
        "parameters": [
          { "name": "query", "in": "query", "schema": { "type": "string", "maxLength": 200 } },
          { "name": "category", "in": "query", "schema": { "type": "string", "maxLength": 80 } },
          { "name": "color", "in": "query", "schema": { "type": "string", "maxLength": 80 } },
          { "name": "maxPrice", "in": "query", "schema": { "type": "number", "minimum": 0 } },
          { "name": "limit", "in": "query", "schema": { "type": "integer", "minimum": 1, "maximum": 20, "default": 8 } }
        ],
        "responses": {
          "200": {
            "description": "Matching products",
            "content": { "application/json": { "schema": { "type": "object", "properties": { "products": { "type": "array", "items": { "$ref": "#/components/schemas/Product" } } } } } }
          }
        }
      }
    },
    "/_api/agent/style-guide": {
      "get": {
        "operationId": "getStyleGuide",
        "summary": "Get Reccas styling principles and public guide links",
        "responses": {
          "200": {
            "description": "Reccas styling guide",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Product": {
        "type": "object",
        "properties": {
          "id": { "type": "integer" },
          "title": { "type": ["string", "null"] },
          "brand": { "type": ["string", "null"] },
          "category": { "type": ["string", "null"] },
          "color": { "type": ["string", "null"] },
          "price": { "type": ["number", "null"] },
          "imageUrl": { "type": ["string", "null"], "format": "uri" },
          "url": { "type": "string", "format": "uri" },
          "seasons": { "type": "array", "items": { "type": "string" } },
          "occasions": { "type": "array", "items": { "type": "string" } }
        }
      },
      "Outfit": {
        "type": "object",
        "properties": {
          "id": { "type": "integer" },
          "name": { "type": "string" },
          "description": { "type": ["string", "null"] },
          "styleTags": { "type": "array", "items": { "type": "string" } },
          "occasion": { "type": "string" },
          "sourceTitle": { "type": "string" },
          "sourceUrl": { "type": "string", "format": "uri" },
          "totalPrice": { "type": "number" },
          "items": { "type": "array", "items": { "$ref": "#/components/schemas/Product" } }
        }
      }
    }
  }
}
