get_section_details
Retrieve comprehensive task statement details including concept lessons, mastery levels, and historical data for certification exam preparation.
Instructions
Get detailed information about a specific task statement including concept lesson, mastery, and history.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| taskStatement | Yes | Task statement ID, e.g. "1.1" |
Implementation Reference
- src/tools/get-section-details.ts:12-54 (handler)The handler function for the 'get_section_details' tool, which retrieves task statement details, mastery levels, answers, and handout information.
server.tool( 'get_section_details', 'Get detailed information about a specific task statement including concept lesson, mastery, and history.', { taskStatement: z.string().describe('Task statement ID, e.g. "1.1"') }, async ({ taskStatement }) => { const userId = userConfig.userId; ensureUser(db, userId); const curriculum = loadCurriculum(); let found = null; for (const d of curriculum.domains) { for (const ts of d.taskStatements) { if (ts.id === taskStatement) { found = { domain: d, ts }; break; } } if (found) break; } if (!found) { return { content: [{ type: 'text' as const, text: JSON.stringify({ error: 'Task statement not found', taskStatement }) }], isError: true, }; } const mastery = getMastery(db, userId, taskStatement); const answers = getAnswersByTaskStatement(db, userId, taskStatement); const handoutViewed = hasViewedHandout(db, userId, taskStatement); const handout = loadHandout(taskStatement); const lines: string[] = [ `═══ ${found.ts.id}: ${found.ts.title} ═══`, `Domain: ${found.domain.title}`, `Description: ${found.ts.description}`, '', `Mastery: ${mastery?.masteryLevel ?? 'unassessed'}`, `Accuracy: ${mastery?.accuracyPercent ?? 0}%`, `Attempts: ${mastery?.totalAttempts ?? 0}`, `Handout Viewed: ${handoutViewed ? 'Yes' : 'No'}`, '', ]; if (handout) { lines.push('--- Concept Lesson ---', '', handout); } return { content: [{ type: 'text' as const, text: lines.join('\n') }] }; } ); - src/tools/get-section-details.ts:11-11 (registration)The registration function 'registerGetSectionDetails' which registers the tool with the MCP server.
export function registerGetSectionDetails(server: McpServer, db: Database.Database, userConfig: UserConfig): void {