{
  "openapi": "3.1.0",
  "info": {
    "title": "Solid# Public MCP API",
    "description": "Public, no-auth surface of the Solid# MCP server (https://solidnumber.com/api/mcp). Discovery, pricing analysis, competitor comparison, industry benchmarks, KB template fetch, ROI calc, signup-link generation. The curated MCP connector (https://api.solidnumber.com/mcp/connector — 85 tools: 185 declared, scoped per tenant, OAuth with per-company binding) and the 1,944-endpoint REST API are tenant-scoped; the authenticated OpenAPI spec is available to verified developers via /dashboard/install-command. For agent/tool discovery, see /.well-known/mcp.json. For AI infrastructure docs: https://solidnumber.com/llms.txt.",
    "version": "1.1.0",
    "contact": {
      "name": "Solid# Support",
      "email": "sales@solidnumber.com",
      "url": "https://solidnumber.com"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://solidnumber.com/legal/terms"
    }
  },
  "servers": [
    {
      "url": "https://solidnumber.com/api/mcp",
      "description": "Production MCP Server"
    },
    {
      "url": "https://api.solidnumber.com/api/v1",
      "description": "Solid# Public API — WebMCP discovery + tenant-scoped endpoints"
    }
  ],
  "paths": {
    "/webmcp/public/manifest": {
      "servers": [
        {
          "url": "https://api.solidnumber.com/api/v1"
        }
      ],
      "get": {
        "operationId": "getWebMcpPublicManifest",
        "summary": "Anonymous, per-tenant WebMCP manifest",
        "description": "Returns the WebMCP tool catalog for a specific company_id, scoped by surface. No auth required for the 'public' and 'tenant-site' surfaces (auth-only surfaces — dashboard / portal / developer — return 400). Used by every Solid# tenant subdomain to register its own per-company verb catalog with navigator.modelContext. Spec: https://webmachinelearning.github.io/webmcp/. Docs: https://solidnumber.com/docs/webmcp. Discovery file: https://solidnumber.com/.well-known/webmcp.json.",
        "tags": [
          "webmcp"
        ],
        "parameters": [
          {
            "name": "company_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "Tenant company_id. Explicit (not derived from auth) so the catalog matches the tenant being rendered."
          },
          {
            "name": "surface",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "public",
                "tenant-site"
              ],
              "default": "tenant-site"
            },
            "description": "WebMCP surface. 'public' = solidnumber.com marketing verbs (read-only navigation). 'tenant-site' = customer-facing CMS pages on each tenant subdomain (reads + write-verb discovery)."
          }
        ],
        "responses": {
          "200": {
            "description": "Manifest envelope { company_id, surface, tier, tools[], count }",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebMcpManifest"
                }
              }
            }
          },
          "400": {
            "description": "Surface requires auth (anon callers may only request 'public' or 'tenant-site')."
          },
          "404": {
            "description": "company_not_found — prevents anon tenant-directory enumeration."
          },
          "422": {
            "description": "company_id must be > 0."
          }
        }
      }
    },
    "/": {
      "get": {
        "operationId": "getServerInfo",
        "summary": "Get MCP server information",
        "description": "Returns server capabilities and available tools",
        "responses": {
          "200": {
            "description": "Server information",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServerInfo"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "callTool",
        "summary": "Execute a public MCP tool",
        "description": "Call any of the 38 public (no-auth) MCP tools served at this endpoint. The curated 85-tool MCP connector (https://api.solidnumber.com/mcp/connector, OAuth with per-company binding) is documented at /.well-known/mcp.json. Errors follow the agent-ready envelope: { error: { code, status, message, hint, docs_url, scope, feature, upgrade_to, request_id } }.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ToolRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tool execution result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ServerInfo": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "solid_number"
          },
          "version": {
            "type": "string",
            "example": "1.0.0"
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Tool"
            }
          }
        }
      },
      "Tool": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "inputSchema": {
            "type": "object"
          }
        }
      },
      "ToolRequest": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "call_tool",
              "list_tools"
            ]
          },
          "tool": {
            "type": "string"
          },
          "arguments": {
            "type": "object"
          }
        }
      },
      "ToolResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "data": {
            "type": "object"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorEnvelope"
          }
        }
      },
      "ErrorEnvelope": {
        "type": "object",
        "description": "Agent-ready error envelope (Solid# v2.0+). Same shape as the @solidnumber/cli --json error output.",
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable machine code (e.g. 'auth.invalid_token', 'scope.missing', 'feature.upgrade_required')."
          },
          "status": {
            "type": "integer",
            "description": "HTTP-style status."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message."
          },
          "hint": {
            "type": "string",
            "description": "What an agent can do next."
          },
          "docs_url": {
            "type": "string",
            "format": "uri"
          },
          "scope": {
            "type": "string",
            "description": "OAuth/RBAC scope that was missing or violated."
          },
          "feature": {
            "type": "string",
            "description": "Feature key (see constants/feature_tiers.py)."
          },
          "upgrade_to": {
            "type": "string",
            "description": "Tier the caller should upgrade to: starter | builder | professional | enterprise."
          },
          "request_id": {
            "type": "string"
          }
        }
      },
      "WebMcpManifest": {
        "type": "object",
        "description": "WebMCP tool catalog envelope returned by /api/v1/webmcp/public/manifest. Same shape served by the authenticated /api/v1/webmcp/manifest endpoint.",
        "properties": {
          "company_id": {
            "type": "integer",
            "description": "Tenant company_id this catalog scopes to."
          },
          "surface": {
            "type": "string",
            "enum": [
              "public",
              "tenant-site",
              "dashboard",
              "portal",
              "developer"
            ]
          },
          "tier": {
            "type": "string",
            "enum": [
              "starter",
              "builder",
              "professional",
              "enterprise"
            ]
          },
          "count": {
            "type": "integer",
            "description": "Number of tools in the catalog."
          },
          "tools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebMcpTool"
            }
          }
        }
      },
      "WebMcpTool": {
        "type": "object",
        "description": "Single WebMCP verb. Same JSON-LD vocab Solid# uses for stdio MCP — the IRI is the platform-canonical identifier.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Snake_case verb name (e.g. 'view_pricing', 'submit_contact_form')."
          },
          "iri": {
            "type": "string",
            "format": "uri",
            "description": "Platform-canonical IRI for reads (https://api.solidnumber.com/webmcp/tools/{name}) or tenant-scoped for writes (https://api.solidnumber.com/co/{company_id}/webmcp/tools/{name})."
          },
          "description": {
            "type": "string"
          },
          "inputSchema": {
            "type": "object",
            "description": "JSON Schema for the verb's input."
          },
          "annotations": {
            "type": "object",
            "properties": {
              "readOnly": {
                "type": "boolean"
              },
              "destructive": {
                "type": "boolean"
              },
              "idempotent": {
                "type": "boolean"
              }
            }
          },
          "endpoint": {
            "type": "object",
            "properties": {
              "method": {
                "type": "string"
              },
              "path": {
                "type": "string"
              }
            }
          },
          "requiresConsent": {
            "type": "boolean",
            "description": "True for write verbs that hit the 4-rung consent ladder."
          },
          "surfaces": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tierFloor": {
            "type": "string",
            "enum": [
              "starter",
              "builder",
              "professional",
              "enterprise"
            ]
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Pricing",
      "description": "Pricing analysis and comparison tools"
    },
    {
      "name": "Competitors",
      "description": "Competitor analysis and comparison"
    },
    {
      "name": "Benchmarks",
      "description": "Industry benchmarks and metrics"
    },
    {
      "name": "Knowledge Base",
      "description": "KB templates and recommendations"
    },
    {
      "name": "AI",
      "description": "AI-powered recommendations"
    }
  ]
}
