Get Goals
get_goalsRetrieve current goals and their progress with optional filters by category or status to track personal and professional objectives.
Instructions
Get current goals and their progress
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_goals"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | No | Filter by category (business, technical, community, content) | |
| status | No | Filter by goal status |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes |
Implementation Reference
- api/mcp.ts:170-189 (handler)Async handler function for the 'get_goals' tool. Reads goals from 'profile/goals/2026-goals.json', optionally filters by category and status, and returns the matching goals with their category title, goal text, status, target date, and metrics.
async ({ category, status }) => { const goals = await readJsonFile<GoalsData>("profile/goals/2026-goals.json"); const result: GoalResult[] = []; for (const [cat, data] of Object.entries(goals.categories)) { if (category && cat !== category) continue; for (const goal of data.goals) { if (status && goal.status !== status) continue; result.push({ category: cat, categoryTitle: data.title, goal: goal.goal, status: goal.status, target_date: goal.target_date, metrics: goal.metrics, }); } } return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } - src/types.ts:89-96 (schema)GoalResult interface defining the output shape: category, categoryTitle, goal, status, target_date, and metrics.
export interface GoalResult { category: string; categoryTitle: string; goal: string; status: string; target_date: string; metrics: GoalMetrics; } - src/types.ts:64-67 (schema)GoalMetrics interface with target and current fields.
export interface GoalMetrics { target: string; current: string; } - src/types.ts:69-75 (schema)Goal interface with id, goal, status, target_date, and metrics fields.
export interface Goal { id: string; goal: string; status: string; target_date: string; metrics: GoalMetrics; } - api/mcp.ts:158-169 (registration)Registration of the 'get_goals' tool via server.registerTool, including its title, description, inputSchema (optional category and status filters), and outputSchema.
// Tool: Get Goals server.registerTool( "get_goals", { title: "Get Goals", description: "Get current goals and their progress", inputSchema: { category: z.string().optional().describe("Filter by category (business, technical, community, content)"), status: z.enum(["in_progress", "not_started", "completed"]).optional().describe("Filter by goal status"), }, outputSchema: textContentOutputSchema, },