scaffold_project
Generate a reference project structure to practice certification concepts hands-on for the Claude Certified Architect exam.
Instructions
Get instructions for a reference project to practice certification concepts hands-on.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | No | Project ID (e.g. "capstone", "d1-agentic"). Omit to see available projects. |
Implementation Reference
- src/tools/scaffold-project.ts:38-97 (handler)The async handler function for the `scaffold_project` tool, which lists available projects or returns the content of a specific project.
async ({ projectId }) => { if (!projectId) { const lines = [ '═══ REFERENCE PROJECTS ═══', '', ...PROJECTS.map(p => ` ${p.id}: ${p.name} (Domains: ${p.domains.join(', ')})`), ]; return { content: [{ type: 'text' as const, text: lines.join('\n') }] }; } const project = PROJECTS.find(p => p.id === projectId); if (!project) { return { content: [{ type: 'text' as const, text: `Project "${projectId}" not found. Use scaffold_project without arguments to see available projects.` }], isError: true, }; } const projectDir = path.join(PROJECTS_DIR, projectId); if (!fs.existsSync(projectDir)) { return { content: [{ type: 'text' as const, text: `Project directory for "${project.name}" not found. The project files may not be installed yet.` }], isError: true, }; } const readmePath = path.join(projectDir, 'README.md'); const readme = fs.existsSync(readmePath) ? fs.readFileSync(readmePath, 'utf-8') : null; const files = listFilesRecursive(projectDir); const sections = [ `═══ ${project.name} ═══`, '', `Domains: ${project.domains.join(', ')}`, '', ]; if (readme) { sections.push('--- README ---', '', readme, ''); } sections.push( '--- Project Files ---', '', ...files.map(f => ` ${f}`), '', '--- Next Steps ---', '', 'Explore the project files above to understand the architecture.', 'Each file demonstrates certification concepts in practice.', `Project root: projects/${projectId}/`, ); return { content: [{ type: 'text' as const, text: sections.join('\n') }], }; } - src/tools/scaffold-project.ts:33-99 (registration)Registration function for the `scaffold_project` tool using `server.tool`.
export function registerScaffoldProject(server: McpServer, _db: Database.Database, _userConfig: UserConfig): void { server.tool( 'scaffold_project', 'Get instructions for a reference project to practice certification concepts hands-on.', { projectId: z.string().optional().describe('Project ID (e.g. "capstone", "d1-agentic"). Omit to see available projects.') }, async ({ projectId }) => { if (!projectId) { const lines = [ '═══ REFERENCE PROJECTS ═══', '', ...PROJECTS.map(p => ` ${p.id}: ${p.name} (Domains: ${p.domains.join(', ')})`), ]; return { content: [{ type: 'text' as const, text: lines.join('\n') }] }; } const project = PROJECTS.find(p => p.id === projectId); if (!project) { return { content: [{ type: 'text' as const, text: `Project "${projectId}" not found. Use scaffold_project without arguments to see available projects.` }], isError: true, }; } const projectDir = path.join(PROJECTS_DIR, projectId); if (!fs.existsSync(projectDir)) { return { content: [{ type: 'text' as const, text: `Project directory for "${project.name}" not found. The project files may not be installed yet.` }], isError: true, }; } const readmePath = path.join(projectDir, 'README.md'); const readme = fs.existsSync(readmePath) ? fs.readFileSync(readmePath, 'utf-8') : null; const files = listFilesRecursive(projectDir); const sections = [ `═══ ${project.name} ═══`, '', `Domains: ${project.domains.join(', ')}`, '', ]; if (readme) { sections.push('--- README ---', '', readme, ''); } sections.push( '--- Project Files ---', '', ...files.map(f => ` ${f}`), '', '--- Next Steps ---', '', 'Explore the project files above to understand the architecture.', 'Each file demonstrates certification concepts in practice.', `Project root: projects/${projectId}/`, ); return { content: [{ type: 'text' as const, text: sections.join('\n') }], }; } ); }