Get Learning Roadmap
get_learning_roadmapRetrieve learning roadmap sections including current focus, queue, backlog, on hold, and completed.
Instructions
Get learning roadmap with current focus, queue, and completed learning
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| section | No | Specific section to retrieve (defaults to all) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes |
Implementation Reference
- api/mcp.ts:379-415 (registration)Registration of the 'get_learning_roadmap' tool with the MCP server, including input schema and handler.
// Tool: Get Learning Roadmap server.registerTool( "get_learning_roadmap", { title: "Get Learning Roadmap", description: "Get learning roadmap with current focus, queue, and completed learning", inputSchema: { section: z.enum(["current_focus", "queue", "backlog", "on_hold", "completed"]).optional().describe("Specific section to retrieve (defaults to all)"), }, outputSchema: textContentOutputSchema, }, async ({ section }) => { const result: Record<string, unknown> = {}; if (!section || section !== "completed") { try { const roadmap = await readJsonFile<LearningRoadmapData>("learning/roadmap.json"); if (section) { result[section] = roadmap[section as keyof LearningRoadmapData]; } else { result.roadmap = roadmap; } } catch { // File may not exist } } if (!section || section === "completed") { try { const completed = await readJsonFile<CompletedLearningData>("learning/completed.json"); result.completed = completed.entries; } catch { // File may not exist } } return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } ); - api/mcp.ts:390-414 (handler)Handler function that fetches learning roadmap data (current_focus, queue, backlog, on_hold) from 'learning/roadmap.json' and completed learning from 'learning/completed.json' via GitHub raw content, returning JSON.
async ({ section }) => { const result: Record<string, unknown> = {}; if (!section || section !== "completed") { try { const roadmap = await readJsonFile<LearningRoadmapData>("learning/roadmap.json"); if (section) { result[section] = roadmap[section as keyof LearningRoadmapData]; } else { result.roadmap = roadmap; } } catch { // File may not exist } } if (!section || section === "completed") { try { const completed = await readJsonFile<CompletedLearningData>("learning/completed.json"); result.completed = completed.entries; } catch { // File may not exist } } return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } - api/mcp.ts:385-387 (schema)Input schema: optional 'section' parameter of type enum (current_focus, queue, backlog, on_hold, completed).
inputSchema: { section: z.enum(["current_focus", "queue", "backlog", "on_hold", "completed"]).optional().describe("Specific section to retrieve (defaults to all)"), }, - api/mcp.ts:40-43 (helper)The readJsonFile generic helper used to fetch and parse JSON data from GitHub raw content.
async function readJsonFile<T>(relativePath: string): Promise<T> { const content = await fetchFromGitHub(relativePath); return JSON.parse(content) as T; } - src/types.ts:311-316 (schema)Type definition for LearningRoadmapData with current_focus, queue, backlog, and on_hold arrays of LearningItem.
export interface LearningRoadmapData { current_focus: LearningItem[]; queue: LearningItem[]; backlog: LearningItem[]; on_hold: LearningItem[]; }