Skip to main content
Glama
vuluu2k
by vuluu2k

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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$/, ""));
    }
  • 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())
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vuluu2k/knowledge_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server