{
  "openapi": "3.1.1",
  "info": {
    "title": "SmartTeenAI public resources and MCP transport",
    "version": "1.0.0",
    "description": "Public documentation and fixed sandbox; protected MCP uses the MCP Streamable HTTP protocol, not a quiz REST API. OAuth deployment must be verified independently."
  },
  "servers": [
    {
      "url": "https://smartteenai.xyz"
    }
  ],
  "externalDocs": {
    "url": "https://smartteenai.xyz/docs"
  },
  "paths": {
    "/.mcp/list-tools": {
      "get": {
        "operationId": "listPublicToolDescriptions",
        "security": [],
        "summary": "Read tool descriptions anonymously; does not invoke tools",
        "responses": {
          "200": {
            "description": "SDK-generated tool catalogue",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/sandbox": {
      "get": {
        "operationId": "readSandboxFixture",
        "security": [],
        "summary": "Fixed simulated response; no account, AI call or database",
        "responses": {
          "200": {
            "description": "Documentation fixture",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "kind",
                    "live",
                    "aiCalled",
                    "databaseAccessed",
                    "result"
                  ],
                  "properties": {
                    "kind": {
                      "const": "simulated_fixture"
                    },
                    "live": {
                      "const": false
                    },
                    "aiCalled": {
                      "const": false
                    },
                    "databaseAccessed": {
                      "const": false
                    },
                    "result": {
                      "type": "object"
                    }
                  },
                  "example": {
                    "kind": "simulated_fixture",
                    "live": false,
                    "aiCalled": false,
                    "databaseAccessed": false,
                    "description": "Fixed documentation example; not real student data or a live blog query.",
                    "tool": "list_blog_articles",
                    "input": {
                      "category": "sandbox",
                      "limit": 1
                    },
                    "result": {
                      "articles": [
                        {
                          "slug": "example-only",
                          "category_slug": "sandbox",
                          "title": "SmartTeenAI sandbox example",
                          "description": "Fictional article illustrating the response shape.",
                          "excerpt": "Documentation fixture only.",
                          "reading_minutes": 1,
                          "published_at": "2026-10-30T00:00:00Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/mcp": {
      "post": {
        "operationId": "mcpMessage",
        "summary": "MCP Streamable HTTP messages (initialize, tools/list, tools/call)",
        "description": "Use an MCP client, protocol negotiation and OAuth discovery. This operation is not a REST tool invocation API.",
        "security": [
          {
            "mcpOAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "MCP JSON or event stream"
          },
          "202": {
            "description": "Notification accepted"
          },
          "401": {
            "description": "Bearer challenge with resource_metadata"
          },
          "403": {
            "description": "Insufficient scope or access"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "mcpOAuth": {
        "type": "oauth2",
        "description": "External Supabase issuer. Empty scopes means resource scopes have not been configured; OIDC identity scopes do not grant database access.",
        "flows": {
          "authorizationCode": {
            "authorizationUrl": "https://kapyuwbkdhgdjycewzci.supabase.co/auth/v1/oauth/authorize",
            "tokenUrl": "https://kapyuwbkdhgdjycewzci.supabase.co/auth/v1/oauth/token",
            "scopes": {}
          }
        }
      }
    }
  },
  "x-mcp": {
    "endpoint": "https://smartteenai.xyz/mcp",
    "protectedResourceMetadata": "https://smartteenai.xyz/.well-known/oauth-protected-resource",
    "catalogue": "https://smartteenai.xyz/.mcp/list-tools",
    "resourceScopesConfigured": false
  }
}