{
  "openapi": "3.1.0",
  "info": {
    "title": "WebZolver Public Agent & Services API",
    "version": "1.0.0",
    "description": "Public read-only REST and Model Context Protocol (MCP) API for WebZolver (WEBZOLVER SpA, Chile). Exposes structured endpoints for web design services, CLP + IVA pricing, portfolio case studies, blog articles, and consultation booking channels. Versioning policy: header-based versioning via optional `X-API-Version` (current: `1.0.0`) and `MCP-Protocol-Version` headers; all responses include `API-Version`. Deprecation policy: any breaking change or endpoint retirement is announced at least 90 days in advance via RFC 8594 `Deprecation` and `Sunset` response headers and documented at https://www.webzolver.cl/docs/.",
    "termsOfService": "https://www.webzolver.cl/politicas/",
    "contact": {
      "name": "WebZolver Support",
      "url": "https://www.webzolver.cl/contacto/",
      "email": "contacto@webzolver.cl"
    },
    "license": {
      "name": "WEBZOLVER SpA Terms of Use",
      "url": "https://www.webzolver.cl/politicas/"
    }
  },
  "servers": [
    {
      "url": "https://www.webzolver.cl",
      "description": "Production server (Chile)"
    }
  ],
  "paths": {
    "/api/mcp/": {
      "get": {
        "operationId": "getWebzolverMcpAndCatalogData",
        "summary": "Retrieve WebZolver MCP discovery metadata, services catalog, or company booking details",
        "description": "Returns MCP server capabilities by default, or returns the full WebZolver services catalog (`?action=services`) or legal and Calendly booking channels (`?action=company`). Compatible with LLM function calling without authentication.",
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "required": false,
            "description": "Select 'services' to return the CLP + IVA service catalog, 'company' to return legal and booking links, or omit for MCP server metadata.",
            "schema": {
              "type": "string",
              "enum": ["services", "company"]
            }
          },
          {
            "name": "slug",
            "in": "query",
            "required": false,
            "description": "Optional service slug filter when action=services (e.g. 'landing', 'sitio-web-corporativo', 'automatizaciones', 'software-a-medida', 'rediseno-web', 'web-autoadministrable', 'diseno-de-logos', or 'all').",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "landing",
                "sitio-web-corporativo",
                "rediseno-web",
                "web-autoadministrable",
                "automatizaciones",
                "software-a-medida",
                "diseno-de-logos"
              ]
            }
          },
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "Optional API version header for explicit version pinning (current: 1.0.0).",
            "schema": {
              "type": "string",
              "default": "1.0.0",
              "enum": ["1.0.0"]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful JSON response with MCP server metadata, services catalog, or company booking info.",
            "headers": {
              "API-Version": {
                "description": "Active API version serving the response",
                "schema": { "type": "string" }
              },
              "Deprecation": {
                "description": "RFC 8594 deprecation timestamp when an endpoint or version is deprecated",
                "schema": { "type": "string" }
              },
              "Sunset": {
                "description": "RFC 8594 sunset date (minimum 90 days notice) when a deprecated version will be retired",
                "schema": { "type": "string" }
              },
              "RateLimit-Limit": {
                "description": "Request quota per window",
                "schema": { "type": "integer" }
              },
              "RateLimit-Remaining": {
                "description": "Remaining requests in current window",
                "schema": { "type": "integer" }
              },
              "RateLimit-Reset": {
                "description": "Seconds until rate limit window resets",
                "schema": { "type": "integer" }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/McpDiscoveryOrCatalogResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad request or invalid parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "invokeWebzolverMcpJsonRpc",
        "summary": "Execute a JSON-RPC 2.0 Model Context Protocol (MCP) request over Streamable HTTP",
        "description": "Handles MCP Streamable HTTP JSON-RPC 2.0 methods (`initialize`, `ping`, `tools/list`, `tools/call`) for `get_services_catalog`, `search_case_studies_and_blog`, and `get_company_and_booking_info`.",
        "parameters": [
          {
            "name": "X-API-Version",
            "in": "header",
            "required": false,
            "description": "Optional API version header for explicit version pinning (current: 1.0.0).",
            "schema": {
              "type": "string",
              "default": "1.0.0",
              "enum": ["1.0.0"]
            }
          },
          {
            "name": "MCP-Protocol-Version",
            "in": "header",
            "required": false,
            "description": "Optional Model Context Protocol version header (e.g. 2025-03-26).",
            "schema": {
              "type": "string",
              "enum": ["2026-07-28", "2025-11-25", "2025-06-18", "2025-03-26", "2024-11-05"]
            }
          }
        ],
        "requestBody": {
          "required": true,
          "description": "JSON-RPC 2.0 request object for Model Context Protocol.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 result or error object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcSuccessResponse"
                }
              }
            }
          },
          "202": {
            "description": "Accepted JSON-RPC notification with no response body."
          },
          "400": {
            "description": "Invalid JSON payload (-32700 Parse error).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "additionalProperties": false,
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"],
            "description": "JSON-RPC protocol version ('2.0')."
          },
          "id": {
            "type": ["string", "integer", "null"],
            "description": "Request correlation identifier."
          },
          "method": {
            "type": "string",
            "enum": ["initialize", "notifications/initialized", "ping", "tools/list", "tools/call"],
            "description": "MCP method name to invoke."
          },
          "params": {
            "type": "object",
            "description": "Method parameters object.",
            "additionalProperties": true
          }
        }
      },
      "JsonRpcSuccessResponse": {
        "type": "object",
        "required": ["jsonrpc", "id", "result"],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          },
          "id": {
            "type": ["string", "integer", "null"]
          },
          "result": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "JsonRpcErrorResponse": {
        "type": "object",
        "required": ["jsonrpc", "id", "error"],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          },
          "id": {
            "type": ["string", "integer", "null"]
          },
          "error": {
            "type": "object",
            "required": ["code", "message"],
            "properties": {
              "code": {
                "type": "integer",
                "description": "Standard JSON-RPC 2.0 error code (-32700, -32600, -32601, -32602, -32603)."
              },
              "message": {
                "type": "string",
                "description": "Human-readable error explanation."
              }
            }
          }
        }
      },
      "ServiceItem": {
        "type": "object",
        "required": ["slug", "title", "price", "vatIncluded", "currency", "url", "description"],
        "properties": {
          "slug": { "type": "string" },
          "title": { "type": "string" },
          "label": { "type": "string" },
          "category": { "type": "string" },
          "price": { "type": "string" },
          "priceNote": { "type": "string" },
          "vatIncluded": { "type": "boolean" },
          "currency": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "markdownUrl": { "type": "string", "format": "uri" },
          "description": { "type": "string" },
          "features": {
            "type": "array",
            "items": { "type": "string" }
          },
          "pricingConditions": { "type": "string" }
        }
      },
      "McpDiscoveryOrCatalogResponse": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "name": { "type": "string" },
          "version": { "type": "string" },
          "protocol": { "type": "string" },
          "endpoint": { "type": "string", "format": "uri" },
          "serverCardUrl": { "type": "string", "format": "uri" },
          "openApiUrl": { "type": "string", "format": "uri" },
          "provider": { "type": "string" },
          "currency": { "type": "string" },
          "count": { "type": "integer" },
          "services": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/ServiceItem" }
          }
        }
      }
    }
  },
  "x-rate-limit-policy": {
    "name": "public-mcp-api",
    "quota": 120,
    "window_seconds": 60,
    "partition": "client IP address"
  },
  "x-api-lifecycle": {
    "current_major_version": "v1",
    "deprecation_policy_url": "https://www.webzolver.cl/politicas/"
  }
}
