{"openapi":"3.1.0","info":{"title":"capstan-docs","description":"Official documentation for Capstan — the AI Agent Native full-stack framework. Query docs via MCP for AI-assisted development.","version":"0.1.0"},"paths":{"/api/docs":{"get":{"summary":"Query Capstan documentation. Without parameters, lists all available documents with summaries. With slug, returns the full content of a specific document. With slug+section, returns a specific section. Use this as the primary tool for looking up Capstan framework APIs, patterns, and configuration.","operationId":"get_api_docs","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"documents":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"section":{"type":"string"},"url":{"type":"string"},"topics":{"type":"array","items":{"type":"string"}},"content":{"type":"string"}},"required":["slug","title","section","url","topics","content"],"additionalProperties":false}},"total":{"type":"number"}},"required":["documents","total"],"additionalProperties":false}}}}},"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"slug":{"description":"Document slug (e.g. 'getting-started', 'core-concepts', 'database'). Omit to list all documents.","type":"string"},"section":{"description":"Section heading within a document (e.g. 'defineAPI', 'File-Based Routing'). Requires slug.","type":"string"}},"additionalProperties":false}}}}}},"/api/examples":{"get":{"summary":"Get code examples for Capstan framework topics. Returns working code snippets with descriptions. Use this when you need concrete examples of how to use Capstan APIs.","operationId":"get_api_examples","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"topic":{"type":"string"},"examples":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"code":{"type":"string"},"language":{"type":"string"},"relatedDocs":{"type":"string"}},"required":["title","description","code","language","relatedDocs"],"additionalProperties":false}},"total":{"type":"number"}},"required":["topic","examples","total"],"additionalProperties":false}}}}},"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"topic":{"type":"string","description":"Topic to find examples for (e.g. 'defineAPI', 'defineModel', 'authentication', 'routing', 'deployment', 'policy', 'ai-toolkit', 'database', 'loader', 'middleware')"},"limit":{"description":"Max examples to return (default 5)","type":"integer","minimum":1,"maximum":20}},"required":["topic"],"additionalProperties":false}}}}}},"/api/health":{"get":{"summary":"Health check endpoint","operationId":"get_api_health","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string"},"timestamp":{"type":"string"}},"required":["status","timestamp"],"additionalProperties":false}}}}}}},"/api/search":{"get":{"summary":"Search the Capstan documentation. Returns matching doc sections ranked by relevance. Use this to find information about Capstan APIs, configuration, patterns, and best practices. Available via HTTP and MCP.","operationId":"get_api_search","responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"query":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"section":{"type":"string"},"url":{"type":"string"},"snippet":{"type":"string"},"score":{"type":"number"},"topics":{"type":"array","items":{"type":"string"}}},"required":["title","section","url","snippet","score","topics"],"additionalProperties":false}},"total":{"type":"number"}},"required":["query","results","total"],"additionalProperties":false}}}}},"requestBody":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"q":{"type":"string","minLength":1,"description":"Search query string"},"topic":{"description":"Filter by topic: routing, database, auth, deployment, api, testing, ai, policy","type":"string"},"limit":{"description":"Max results to return (default 10)","type":"integer","minimum":1,"maximum":50}},"required":["q"],"additionalProperties":false}}}}}}}}