{
  "openapi": "3.1.0",
  "info": {
    "title": "COFFR Public API",
    "version": "1.0.0",
    "description": "Read-only public surface for COFFR — pricing, plans, security posture, integrations, and FAQs. Backed by the public MCP server. For richer tool calling, prefer /.well-known/mcp.json.",
    "contact": { "name": "COFFR", "url": "https://staging.getcoffr.com", "email": "hello@getcoffr.com" },
    "license": { "name": "Proprietary" }
  },
  "servers": [
    { "url": "https://wrlprkdqcduvequpwmpr.supabase.co/functions/v1/mcp-server", "description": "MCP JSON-RPC endpoint" }
  ],
  "paths": {
    "/": {
      "get": {
        "summary": "MCP server card",
        "description": "Returns the public MCP server card: capabilities, tool catalogue, and server metadata.",
        "responses": {
          "200": { "description": "Server card JSON", "content": { "application/json": { "schema": { "type": "object" } } } }
        }
      },
      "post": {
        "summary": "JSON-RPC 2.0 endpoint",
        "description": "Standard MCP Streamable HTTP. Methods: initialize, tools/list, tools/call, ping.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["jsonrpc", "method"],
                "properties": {
                  "jsonrpc": { "type": "string", "enum": ["2.0"] },
                  "id": { "oneOf": [{ "type": "string" }, { "type": "number" }, { "type": "null" }] },
                  "method": { "type": "string", "enum": ["initialize", "tools/list", "tools/call", "ping"] },
                  "params": { "type": "object" }
                }
              },
              "examples": {
                "list_tools": { "value": { "jsonrpc": "2.0", "id": 1, "method": "tools/list" } },
                "get_pricing": { "value": { "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "get_pricing", "arguments": {} } } }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "JSON-RPC response", "content": { "application/json": { "schema": { "type": "object" } } } }
        }
      }
    }
  },
  "x-mcp": {
    "discovery": "https://staging.getcoffr.com/.well-known/mcp.json",
    "tools": [
      "get_company_overview", "list_products", "get_pricing", "compare_plans",
      "list_features", "get_feature_availability", "get_security_posture",
      "list_integrations", "list_use_cases", "list_faqs", "search_faqs",
      "get_faq", "estimate_monthly_cost", "request_demo",
      "list_comparisons", "get_comparison", "list_glossary_terms", "get_glossary_term",
      "get_changelog", "get_compliance_status"
    ]
  }
}
