listTopics
Discover available knowledge topics in your GitHub-based knowledge base. Use this tool to see what information exists before reading content.
Instructions
List all knowledge topics. Returns topic names only (no content). Use this first to discover what knowledge exists before reading.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/core/knowledge.ts:70-76 (handler)The implementation of the `listTopics` method within the `KnowledgeBase` class.
/** * List all topic names. 1 API call, no file content read. */ async listTopics(): Promise<string[]> { const files = await this.client.listDirectory(this.knowledgePath); return files.map((f) => f.replace(/\.md$/, "")); } - src/tools/knowledge.ts:10-17 (registration)The registration of the `listTopics` tool using `server.registerTool` and the handler logic.
server.registerTool( "listTopics", { description: "List all knowledge topics. Returns topic names only (no content). Use this first to discover what knowledge exists before reading.", }, toolHandler("listTopics", async () => kb.listTopics()) );