{
  "openapi": "3.1.0",
  "info": {
    "title": "BotSpot Public Discovery API",
    "version": "1.0.0",
    "description": "Public, unauthenticated discovery documents for BotSpot. Trading, strategy, backtest, deployment, and broker tools are exposed through the authenticated BotSpot MCP server documented at https://botspot.trade/agents."
  },
  "servers": [
    {
      "url": "https://botspot.trade",
      "description": "BotSpot public website"
    }
  ],
  "paths": {
    "/.well-known/botspot-manifest.json": {
      "get": {
        "operationId": "getBotspotManifest",
        "summary": "Get BotSpot public manifest",
        "description": "Returns public route, broker, pricing, and machine-readable artifact metadata generated from BotSpot website sources.",
        "responses": {
          "200": {
            "description": "BotSpot public manifest",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/PublicManifest" }
              }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "getBotspotAgentIndex",
        "summary": "Get BotSpot agent-readable index",
        "description": "Returns BotSpot routes, use guidance, pricing source output, broker connections, and machine-readable resource links as plain text.",
        "responses": {
          "200": {
            "description": "Agent-readable BotSpot index",
            "content": {
              "text/plain": { "schema": { "type": "string" } },
              "text/markdown": { "schema": { "type": "string" } }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "operationId": "getBotspotSitemap",
        "summary": "Get BotSpot public sitemap",
        "description": "Returns canonical indexable BotSpot website routes.",
        "responses": {
          "200": {
            "description": "XML sitemap",
            "content": {
              "application/xml": { "schema": { "type": "string" } }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "operationId": "getBotspotOpenapiDocument",
        "summary": "Get this OpenAPI document",
        "description": "Returns typed definitions for BotSpot public discovery resources.",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document",
            "content": {
              "application/json": { "schema": { "type": "object" } }
            }
          },
          "404": { "$ref": "#/components/responses/NotFound" }
        }
      }
    },
    "/.well-known/mcp": {
      "get": {
        "operationId": "discoverBotspotMcpServer",
        "summary": "Discover BotSpot MCP server",
        "description": "Redirects to BotSpot's live Streamable HTTP MCP endpoint while preserving the request method.",
        "responses": {
          "307": {
            "description": "Temporary redirect to live BotSpot MCP endpoint",
            "headers": {
              "Location": {
                "description": "Live MCP endpoint",
                "schema": { "type": "string", "format": "uri" }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "PublicManifest": {
        "type": "object",
        "required": ["schemaVersion", "name", "baseUrl", "artifacts", "routes"],
        "properties": {
          "schemaVersion": { "type": "integer" },
          "name": { "type": "string" },
          "baseUrl": { "type": "string", "format": "uri" },
          "artifacts": { "type": "object", "additionalProperties": { "type": "string" } },
          "routes": { "type": "object" }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "required": ["code", "message", "resolution"],
            "properties": {
              "code": { "type": "string", "example": "not_found" },
              "message": { "type": "string" },
              "resolution": { "type": "string" },
              "links": { "type": "object", "additionalProperties": { "type": "string" } }
            }
          }
        }
      }
    },
    "responses": {
      "NotFound": {
        "description": "Requested public resource does not exist",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/ErrorResponse" }
          },
          "text/markdown": { "schema": { "type": "string" } }
        }
      }
    }
  }
}
