{
  "openapi": "3.1.0",
  "info": {
    "title": "Dra. Mariana Seiffert — API pública para agentes",
    "version": "1.0.0",
    "description": "API somente leitura com informações institucionais públicas e acesso ao servidor MCP. Não analisa casos jurídicos, não confirma direito a benefício e não recebe dados pessoais.",
    "contact": {
      "name": "Dra. Mariana Seiffert",
      "email": "marianaseiffert93@gmail.com",
      "url": "https://dramarianaseiffert.com.br/contact"
    }
  },
  "servers": [
    { "url": "https://dramarianaseiffert.com.br", "description": "Produção" }
  ],
  "paths": {
    "/api/agent-info": {
      "get": {
        "operationId": "getAgentInfo",
        "summary": "Obtém informações públicas e canais oficiais",
        "description": "Retorna identidade profissional, escopo, localização, avisos de segurança e links legíveis por máquina.",
        "responses": {
          "200": {
            "description": "Informações públicas atuais",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/AgentInfo" }
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp": {
      "post": {
        "operationId": "callMcp",
        "summary": "Envia uma mensagem JSON-RPC ao servidor MCP",
        "description": "Transporte MCP Streamable HTTP dual-era: 2026-07-28, 2025-06-18 e 2025-03-26. Envie Accept: application/json, text/event-stream.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/JsonRpcRequest" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Resposta JSON-RPC",
            "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JsonRpcResponse" } } }
          },
          "202": { "description": "Notificação aceita" },
          "400": { "description": "Mensagem JSON-RPC ou versão inválida" },
          "403": { "description": "Origin não permitido" },
          "406": { "description": "Cabeçalho Accept incompatível" },
          "415": { "description": "Content-Type incompatível" }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AgentInfo": {
        "type": "object",
        "required": ["name", "professionalName", "description", "url", "serviceType", "location", "areaServed", "language", "contact", "scope", "safety", "legalNotice", "machineReadable"],
        "properties": {
          "name": { "type": "string" },
          "professionalName": { "type": "string" },
          "description": { "type": "string" },
          "url": { "type": "string", "format": "uri" },
          "serviceType": { "type": "string" },
          "location": { "type": "object" },
          "areaServed": { "type": "string" },
          "language": { "type": "string" },
          "contact": { "type": "object" },
          "scope": { "type": "array", "items": { "type": "string" } },
          "safety": { "type": "array", "items": { "type": "string" } },
          "legalNotice": { "type": "string" },
          "machineReadable": { "type": "object" }
        }
      },
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "properties": {
          "jsonrpc": { "const": "2.0" },
          "id": { "type": ["string", "number", "null"] },
          "method": { "type": "string" },
          "params": { "type": "object" }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": ["jsonrpc"],
        "properties": {
          "jsonrpc": { "const": "2.0" },
          "id": { "type": ["string", "number", "null"] },
          "result": {},
          "error": { "type": "object" }
        }
      }
    }
  }
}
