generate_documentation_report
Generate documentation reports to analyze status, quality, lifecycle, connections, and duplicates for project documentation.
Instructions
Generate comprehensive reports on documentation status and quality
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reportType | Yes | Type of report to generate | |
| timeRange | No | Time range for the report | |
| includeAI | No | Include AI analysis in report |
Implementation Reference
- src/tools/enhanced/index.ts:437-473 (handler)The core handler function for the 'generate_documentation_report' tool. It logs the report generation, dispatches to specific report generator functions based on the reportType parameter, handles errors, and returns a structured response including the report and timestamp.tools.set('generate_documentation_report', async (args: any) => { try { logger.info(`Generating ${args.reportType} report`); let report: any; switch (args.reportType) { case 'lifecycle': report = await generateLifecycleReport(args.timeRange, lifecycleService, dateTimeService); break; case 'quality': report = await generateQualityReport(args.includeAI, lifecycleService, aiService, dateTimeService); break; case 'connections': report = await generateConnectionsReport(connectionService, dateTimeService); break; case 'duplicates': report = await generateDuplicatesReport(lifecycleService, aiService, dateTimeService); break; case 'comprehensive': report = await generateComprehensiveReport(args.timeRange, args.includeAI, services); break; default: throw new Error(`Unknown report type: ${args.reportType}`); } return { success: true, reportType: args.reportType, report, generatedAt: localizationService.getCurrentDateTimeString() }; } catch (error) { logger.error('Failed to generate documentation report:', error); throw error; } });
- src/types/enhanced.types.ts:131-138 (schema)Zod schema providing TypeScript type safety and validation for the input parameters of the generate_documentation_report tool, including reportType, optional timeRange, and includeAI flag.export const GenerateDocumentationReportSchema = z.object({ reportType: z.enum(['lifecycle', 'quality', 'connections', 'duplicates', 'comprehensive']), timeRange: z.object({ start: z.string().datetime(), end: z.string().datetime(), }).optional(), includeAI: z.boolean().default(true), });
- src/tools/enhanced/index.ts:188-221 (registration)MCPTool registration definition for 'generate_documentation_report', including the tool name, description, and JSON Schema for input validation, returned as part of the enhancedTools array.{ name: 'generate_documentation_report', description: 'Generate comprehensive reports on documentation status and quality', inputSchema: { type: 'object', properties: { reportType: { type: 'string', enum: ['lifecycle', 'quality', 'connections', 'duplicates', 'comprehensive'], description: 'Type of report to generate' }, timeRange: { type: 'object', properties: { start: { type: 'string', description: 'Start date (ISO format)' }, end: { type: 'string', description: 'End date (ISO format)' } }, description: 'Time range for the report' }, includeAI: { type: 'boolean', description: 'Include AI analysis in report', default: true } }, required: ['reportType'] } }