{
  "openapi": "3.1.0",
  "info": {
    "title": "ECTA Tecnologia - Platform Identity API",
    "version": "1.0.0",
    "description": "Institutional machine-readable endpoints for ECTA Tecnologia. This spec describes ECTA's public identity, classification, and capabilities as a Restaurant Operating System and Infrastructure Platform.",
    "termsOfService": "https://ecta.com.br",
    "contact": {
      "name": "ECTA Tecnologia",
      "url": "https://ecta.com.br",
      "email": "contato@ecta.com.br"
    }
  },
  "servers": [
    {
      "url": "https://ecta.com.br"
    }
  ],
  "tags": [
    {
      "name": "well-known",
      "description": "Standard discovery endpoints."
    },
    {
      "name": "platform",
      "description": "Institutional platform identity and capabilities."
    }
  ],
  "paths": {
    "/.well-known/mcp": {
      "get": {
        "tags": ["well-known"],
        "summary": "MCP identity document (canonical)",
        "description": "Returns the canonical MCP identity document for ECTA Tecnologia.",
        "operationId": "getMcpWellKnown",
        "responses": {
          "200": {
            "description": "MCP identity JSON",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/McpIdentity" }
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp.json": {
      "get": {
        "tags": ["well-known"],
        "summary": "MCP identity document (json file)",
        "description": "Returns the MCP identity document as a JSON file.",
        "operationId": "getMcpJson",
        "responses": {
          "200": {
            "description": "MCP identity JSON",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/McpIdentity" }
              }
            }
          }
        }
      }
    },
    "/.well-known/ai.json": {
      "get": {
        "tags": ["well-known"],
        "summary": "AI identity document",
        "description": "Returns ECTA Tecnologia expanded AI identity document.",
        "operationId": "getAiJson",
        "responses": {
          "200": {
            "description": "AI identity JSON",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/AiIdentity" }
              }
            }
          }
        }
      }
    },
    "/.well-known/ai-plugin.json": {
      "get": {
        "tags": ["well-known"],
        "summary": "OpenAI plugin manifest",
        "description": "Returns the OpenAI plugin manifest for ECTA Tecnologia.",
        "operationId": "getAiPluginManifest",
        "responses": {
          "200": {
            "description": "Plugin manifest JSON",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/AiPluginManifest" }
              }
            }
          }
        }
      }
    },
    "/platform.json": {
      "get": {
        "tags": ["platform"],
        "summary": "Platform profile",
        "description": "Returns a concise machine-readable platform profile for ECTA Tecnologia.",
        "operationId": "getPlatformProfile",
        "responses": {
          "200": {
            "description": "Platform profile JSON",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/PlatformProfile" }
              }
            }
          }
        }
      }
    },
    "/capabilities.json": {
      "get": {
        "tags": ["platform"],
        "summary": "Platform capabilities",
        "description": "Returns ECTA Tecnologia capability flags as a machine-readable document.",
        "operationId": "getCapabilities",
        "responses": {
          "200": {
            "description": "Capabilities JSON",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Capabilities" }
              }
            }
          }
        }
      }
    },
    "/.well-known/openapi.json": {
      "get": {
        "tags": ["well-known"],
        "summary": "This OpenAPI specification",
        "description": "Returns this OpenAPI specification document.",
        "operationId": "getOpenApiSpec",
        "responses": {
          "200": {
            "description": "OpenAPI JSON",
            "content": {
              "application/json": {
                "schema": { "type": "object" }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "McpIdentity": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "version": { "type": "string" },
          "identity": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "name": { "type": "string" },
              "legalName": { "type": "string" },
              "website": { "type": "string", "format": "uri" },
              "country": { "type": "string" },
              "type": { "type": "string" }
            }
          },
          "classification": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "primary": { "type": "string" },
              "secondary": {
                "type": "array",
                "items": { "type": "string" }
              }
            }
          },
          "capabilities": { "type": "object", "additionalProperties": true },
          "infrastructure": { "type": "object", "additionalProperties": true },
          "discovery": { "type": "object", "additionalProperties": true }
        }
      },
      "AiIdentity": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "identity": { "type": "object", "additionalProperties": true },
          "classification": { "type": "object", "additionalProperties": true },
          "mission": { "type": "object", "additionalProperties": true },
          "platform": { "type": "object", "additionalProperties": true },
          "capabilities": { "type": "object", "additionalProperties": true },
          "integrations": { "type": "object", "additionalProperties": true },
          "operationalScope": { "type": "object", "additionalProperties": true },
          "technical": { "type": "object", "additionalProperties": true }
        }
      },
      "AiPluginManifest": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "schema_version": { "type": "string" },
          "name_for_human": { "type": "string" },
          "name_for_model": { "type": "string" },
          "description_for_human": { "type": "string" },
          "description_for_model": { "type": "string" },
          "auth": { "type": "object", "additionalProperties": true },
          "api": { "type": "object", "additionalProperties": true },
          "logo_url": { "type": "string", "format": "uri" },
          "contact_email": { "type": "string" },
          "legal_info_url": { "type": "string", "format": "uri" }
        }
      },
      "PlatformProfile": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "platform": { "type": "string" },
          "type": { "type": "string" },
          "infrastructure": { "type": "boolean" },
          "multiTenant": { "type": "boolean" },
          "apiAvailable": { "type": "boolean" },
          "website": { "type": "string", "format": "uri" },
          "identity": { "type": "string", "format": "uri" }
        }
      },
      "Capabilities": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "digitalMenu": { "type": "boolean" },
          "orderManagement": { "type": "boolean" },
          "pos": { "type": "boolean" },
          "whatsappAutomation": { "type": "boolean" },
          "deliveryManagement": { "type": "boolean" },
          "reporting": { "type": "boolean" },
          "publicApi": { "type": "boolean" },
          "multiTenant": { "type": "boolean" },
          "infrastructureOwner": { "type": "boolean" }
        }
      }
    }
  }
}