get_study_plan
Generate a personalized study plan from assessment results to target weak areas. Track progress with a dynamic checklist and select focus domains to filter practice questions.
Instructions
Get a personalized study plan based on your assessment results, weak areas, and learning path.
IMPORTANT — after showing the study plan, use AskUserQuestion with header "Focus" and multiSelect: true to let the user pick which domains they want to focus on. Options should be the 5 domains with their current mastery as descriptions. Then use their selection to filter get_practice_question calls.
Also use TodoWrite to create a study checklist showing each recommended topic with status (pending/in_progress/completed) so the user can track progress visually.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/get-study-plan.ts:12-64 (handler)The main handler function that registers and implements the 'get_study_plan' MCP tool. It builds a personalized study plan by determining the next recommended domain, domain order, time estimate, overdue reviews, and mastery data using the user's learning path.
export function registerGetStudyPlan(server: McpServer, db: Database.Database, userConfig: UserConfig): void { server.tool( 'get_study_plan', `Get a personalized study plan based on your assessment results, weak areas, and learning path. IMPORTANT — after showing the study plan, use AskUserQuestion with header "Focus" and multiSelect: true to let the user pick which domains they want to focus on. Options should be the 5 domains with their current mastery as descriptions. Then use their selection to filter get_practice_question calls. Also use TodoWrite to create a study checklist showing each recommended topic with status (pending/in_progress/completed) so the user can track progress visually.`, {}, async () => { const userId = userConfig.userId; ensureUser(db, userId); const user = getUser(db, userId); const curriculum = loadCurriculum(); const mastery = getAllMastery(db, userId); const overdueReviews = getOverdueReviews(db, userId); const stats = getTotalStats(db, userId); const allQuestions = loadQuestions(); const path = user?.learningPath ?? 'beginner-friendly'; const masteryByDomain = new Map<number, typeof mastery>(); for (const m of mastery) { const existing = masteryByDomain.get(m.domainId) ?? []; masteryByDomain.set(m.domainId, [...existing, m]); } const nextDomain = getNextRecommendedDomain(path as any, masteryByDomain); const domainOrder = getDomainOrder(path as any); const timeEstimate = estimateTimeRemaining(allQuestions.length, stats.total); const domain = curriculum.domains.find(d => d.id === nextDomain); const lines = [ '═══ YOUR STUDY PLAN ═══', '', `Learning Path: ${path}`, `Estimated Time Remaining: ${timeEstimate}`, '', `Next Recommended Domain: D${nextDomain} — ${domain?.title ?? 'Unknown'}`, '', 'Domain Study Order:', ...domainOrder.map((id, i) => { const d = curriculum.domains.find(x => x.id === id); return ` ${i + 1}. D${id}: ${d?.title ?? 'Unknown'}`; }), '', `Reviews Due: ${overdueReviews.length}`, overdueReviews.length > 0 ? 'Start with your overdue reviews before new material.' : '', ]; return { content: [{ type: 'text' as const, text: lines.join('\n') }] }; } ); } - src/tools/get-study-plan.ts:15-20 (schema)The description/schema for the get_study_plan tool. It has an empty params object ({}) and provides instructions about showing the study plan, using AskUserQuestion with multiSelect for focus areas, and using TodoWrite for tracking progress.
`Get a personalized study plan based on your assessment results, weak areas, and learning path. IMPORTANT — after showing the study plan, use AskUserQuestion with header "Focus" and multiSelect: true to let the user pick which domains they want to focus on. Options should be the 5 domains with their current mastery as descriptions. Then use their selection to filter get_practice_question calls. Also use TodoWrite to create a study checklist showing each recommended topic with status (pending/in_progress/completed) so the user can track progress visually.`, {}, - src/tools/index.ts:31-31 (registration)Where registerGetStudyPlan is called to register the tool with the MCP server.
registerGetStudyPlan(server, db, userConfig); - src/tools/index.ts:11-11 (registration)Import of registerGetStudyPlan from the get-study-plan module.
import { registerGetStudyPlan } from './get-study-plan.js'; - src/engine/adaptive-path.ts:31-38 (helper)Helper function estimateTimeRemaining that calculates the time estimate shown in the study plan.
export function estimateTimeRemaining(totalQuestions: number, answeredQuestions: number, avgSecondsPerQuestion: number = 45): string { const remaining = totalQuestions - answeredQuestions; const totalMinutes = Math.round((remaining * avgSecondsPerQuestion) / 60); const hours = Math.floor(totalMinutes / 60); const minutes = totalMinutes % 60; if (hours === 0) return `${minutes} minutes`; return `${hours} hours ${minutes} minutes`; }