{"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"},"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 all wiki pages","description":"Return every page (id + title). Use to see the wiki's scope or when the user asks what topics exist.","operationId":"list_pages","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PageRef"},"type":"array","title":"Response List Pages"}}}}},"security":[{"HTTPBearer":[]}]}}},"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"},"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"}}}}