Skip to main content
Glama
vuluu2k
by vuluu2k

getKnowledge

Retrieve structured knowledge entries from a specific topic to access organized information from a version-controlled repository.

Instructions

Get all entries from a specific knowledge topic. Use listTopics first to see available topics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicYesTopic name (e.g. typescript, docker, project-setup)

Implementation Reference

  • The core logic for retrieving knowledge, which fetches the topic file and parses it into entries.
    async getTopic(topic: string): Promise<{ topic: string; entries: KnowledgeEntry[] }> {
      const file = await this.client.getFile(this.topicPath(topic));
      return { topic, entries: parseEntries(file.content) };
    }
  • Registration of the 'getKnowledge' tool with the MCP server, mapping it to the 'getTopic' handler.
    server.registerTool(
      "getKnowledge",
      {
        description:
          "Get all entries from a specific knowledge topic. Use listTopics first to see available topics.",
        inputSchema: {
          topic: z.string().describe("Topic name (e.g. typescript, docker, project-setup)"),
        },
      },
      toolHandler("getKnowledge", async ({ topic }) => kb.getTopic(topic))
    );

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