{
  "openapi": "3.1.0",
  "info": {
    "title": "zavod-stanki.ru API — Каменский станкостроительный завод",
    "description": "API для AI-агентов: поиск станков, характеристики, изображения, FAQ, заказы. Plan-Act-Check архитектура.",
    "version": "1.1.0",
    "x-aeo-score": "90%",
    "x-agent-flow": "initial_state → [plan → check] → desired_state"
  },
  "servers": [
    {
      "url": "https://zavod-stanki.ru",
      "description": "Production"
    }
  ],
  "x-mcp-servers": {
    "streamable": {
      "url": "https://zavod-stanki.ru/mcp",
      "transport": "streamable-http",
      "protocolVersion": "2025-11-25"
    },
    "card": {
      "url": "https://zavod-stanki.ru/.well-known/mcp/server-card.json"
    },
    "manifest": {
      "url": "https://zavod-stanki.ru/.well-known/mcp"
    }
  },
  "paths": {
    "/api/v1/machine-info": {
      "get": {
        "summary": "Поиск станков по названию",
        "description": "Plan-Act-Check: ACT — поиск в каталоге",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Поисковый запрос: модель, материал, размер"
          },
          {
            "name": "category",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Массив станков с id, name, price, image"
          }
        }
      }
    },
    "/api/v1/ai-meta/{id}": {
      "get": {
        "summary": "SSR-страница товара для AI-краулеров",
        "description": "Plan-Act-Check: CHECK — верификация данных. HTML с JSON-LD, OG, alt, BreadcrumbList",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "User-Agent",
            "in": "header",
            "schema": {
              "type": "string",
              "example": "ChatGPT-User"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "HTML страница с schema.org Product"
          }
        }
      }
    },
    "/api/v1/faq": {
      "get": {
        "summary": "FAQ с FAQPage JSON-LD",
        "description": "Plan-Act-Check: PLAN — получить ответы на вопросы клиента",
        "responses": {
          "200": {
            "description": "12 вопросов с FAQPage schema"
          }
        }
      }
    },
    "/api/v1/ai-images": {
      "get": {
        "summary": "Все изображения станков с alt и caption",
        "description": "Plan-Act-Check: ACT — найти изображения для ответа",
        "responses": {
          "200": {
            "description": "661 изображение с alt-тегами"
          }
        }
      }
    },
    "/api/v1/ai-changelog": {
      "get": {
        "summary": "История изменений для AI-агентов",
        "description": "Plan-Act-Check: PLAN — узнать что уже сделано",
        "responses": {
          "200": {
            "description": "16 entries"
          }
        }
      }
    },
    "/api/v1/ai-todo": {
      "get": {
        "summary": "TODO list для AI-агентов",
        "description": "Plan-Act-Check: PLAN — понять что нужно сделать",
        "responses": {
          "200": {
            "description": "17 done, 8 pending"
          }
        }
      }
    },
    "/api/v1/ai-tools": {
      "get": {
        "summary": "Manifest всех AI инструментов",
        "description": "Plan-Act-Check: PLAN — discovery доступных функций",
        "responses": {
          "200": {
            "description": "8 инструментов"
          }
        }
      }
    },
    "/.well-known/llms.txt": {
      "get": {
        "summary": "LLMs.txt — описание компании и каталога",
        "description": "Plan-Act-Check: PLAN — загрузить контекст о компании",
        "responses": {
          "200": {
            "description": "Каталог 50 станков + FAQ + контакты"
          }
        }
      }
    },
    "/image-sitemap.xml": {
      "get": {
        "summary": "Image sitemap — все изображения",
        "description": "Plan-Act-Check: ACT — найти изображения для ответа",
        "responses": {
          "200": {
            "description": "661 изображение"
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "summary": "Streamable HTTP MCP (JSON-RPC 2.0)",
        "description": "methods: initialize, tools/list, tools/call, ping",
        "responses": {
          "200": {
            "description": "JSON-RPC result"
          }
        }
      },
      "get": {
        "summary": "MCP probe / SSE",
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/api/mcp/health": {
      "get": {
        "summary": "Health",
        "responses": {
          "200": {
            "description": "ok"
          }
        }
      }
    },
    "/api/mcp/manifest": {
      "get": {
        "summary": "REST tools manifest",
        "responses": {
          "200": {
            "description": "tools"
          }
        }
      }
    }
  }
}
