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
| Name | Required | Description | Default |
|---|---|---|---|
| section | No | Which goals section to retrieve | short-term |
Implementation Reference
- src/core/brain.ts:118-127 (handler)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; } } - src/tools/notes.ts:41-54 (registration)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)) );