{"openapi":"3.1.0","info":{"title":"wiki-share tools","description":"Tools to read and search a specific wiki. ALWAYS use these tools to answer questions about the wiki; do not rely on prior knowledge. If the tools return nothing relevant, say the answer is not in the wiki.","version":"0.1.0"},"servers":[{"url":"https://wiki-tools.cdogen.cc"}],"paths":{"/search_wiki":{"get":{"summary":"Search the wiki","description":"Hybrid keyword+semantic search over the wiki. Returns the most relevant pages with a short snippet. Use this first to find which pages answer a question, then read_page for detail.","operationId":"search_wiki","security":[{"HTTPBearer":[]}],"parameters":[{"name":"query","in":"query","required":true,"schema":{"type":"string","description":"the search query / question","title":"Query"},"description":"the search query / question"},{"name":"top_k","in":"query","required":false,"schema":{"type":"integer","maximum":20,"minimum":1,"description":"how many pages to return","default":6,"title":"Top K"},"description":"how many pages to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/read_page":{"get":{"summary":"Read a wiki page","description":"Return the full markdown of one wiki page by its pageId (the id shown in search results). Use to get details / quote exactly.","operationId":"read_page","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page_id","in":"query","required":true,"schema":{"type":"string","description":"pageId from search_wiki or a [[wikilink]] target","title":"Page Id"},"description":"pageId from search_wiki or a [[wikilink]] target"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageContent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/linked_pages":{"get":{"summary":"Get a page's wikilinks","description":"Return the pages this page links to (linksTo) and the pages that link to it (linkedFrom). Use to explore related topics via the graph.","operationId":"linked_pages","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page_id","in":"query","required":true,"schema":{"type":"string","description":"pageId to inspect","title":"Page Id"},"description":"pageId to inspect"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinksResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/list_pages":{"get":{"summary":"List wiki pages (paginated)","description":"Return a PAGE of the wiki's page list (id + title), newest ordering as stored. This wiki has too many pages to list at once, so results are paginated and truncated by default. To find pages about a topic use search_wiki instead — it is cheaper and more relevant. Use `q` to filter titles/ids, and `offset` to page through when `truncated` is true.","operationId":"list_pages","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","description":"optional filter: substring matched on title and pageId","default":"","title":"Q"},"description":"optional filter: substring matched on title and pageId"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"how many pages to return (max 200)","default":50,"title":"Limit"},"description":"how many pages to return (max 200)"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"how many pages to skip","default":0,"title":"Offset"},"description":"how many pages to skip"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"LinksResult":{"properties":{"pageId":{"type":"string","title":"Pageid"},"linksTo":{"items":{"type":"string"},"type":"array","title":"Linksto"},"linkedFrom":{"items":{"type":"string"},"type":"array","title":"Linkedfrom"}},"type":"object","required":["pageId","linksTo","linkedFrom"],"title":"LinksResult"},"PageContent":{"properties":{"pageId":{"type":"string","title":"Pageid"},"title":{"type":"string","title":"Title"},"path":{"type":"string","title":"Path"},"markdown":{"type":"string","title":"Markdown"}},"type":"object","required":["pageId","title","path","markdown"],"title":"PageContent"},"PageList":{"properties":{"total":{"type":"integer","title":"Total"},"offset":{"type":"integer","title":"Offset"},"limit":{"type":"integer","title":"Limit"},"returned":{"type":"integer","title":"Returned"},"truncated":{"type":"boolean","title":"Truncated"},"pages":{"items":{"$ref":"#/components/schemas/PageRef"},"type":"array","title":"Pages"}},"type":"object","required":["total","offset","limit","returned","truncated","pages"],"title":"PageList"},"PageRef":{"properties":{"pageId":{"type":"string","title":"Pageid"},"title":{"type":"string","title":"Title"}},"type":"object","required":["pageId","title"],"title":"PageRef"},"SearchHit":{"properties":{"pageId":{"type":"string","title":"Pageid"},"title":{"type":"string","title":"Title"},"snippet":{"type":"string","title":"Snippet"},"score":{"type":"number","title":"Score"},"relevance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Relevance"}},"type":"object","required":["pageId","title","snippet","score"],"title":"SearchHit"},"SearchResults":{"properties":{"query":{"type":"string","title":"Query"},"mode":{"type":"string","title":"Mode"},"hits":{"items":{"$ref":"#/components/schemas/SearchHit"},"type":"array","title":"Hits"}},"type":"object","required":["query","mode","hits"],"title":"SearchResults"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}