Skip to main content
Glama
vuluu2k
by vuluu2k

getGoals

Retrieve short-term or long-term goals from a structured knowledge base to track progress and manage objectives.

Instructions

Get goals from short-term or long-term sections

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionNoWhich goals section to retrieveshort-term

Implementation Reference

  • The actual implementation of the getGoals tool logic within the Brain class.
    async getGoals(section: "short-term" | "long-term"): Promise<Goal[]> {
      const brainSection: BrainSection = `goals/${section}`;
      try {
        const file = await this.sync.readSection(brainSection);
        return parseGoals(file.content, brainSection);
      } catch (err) {
        if (isNotFound(err)) return [];
        throw err;
      }
    }
  • The MCP tool registration for "getGoals" which maps the tool request to the brain.getGoals method.
    server.registerTool(
      "getGoals",
      {
        description: "Get goals from short-term or long-term sections",
        inputSchema: {
          section: z
            .enum(["short-term", "long-term"])
            .optional()
            .default("short-term")
            .describe("Which goals section to retrieve"),
        },
      },
      toolHandler("getGoals", async ({ section }) => brain.getGoals(section))
    );

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