initialize_documentation_system
Set up automated documentation generation for a project by configuring the root directory and optional AI analysis features.
Instructions
Initialize the enhanced documentation automation system for a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectRoot | Yes | Root directory of the project | |
| enableAI | No | Enable AI-powered analysis features | |
| timeZone | No | Timezone for date/time operations (optional - auto-detected if not provided) | |
| locale | No | Locale for internationalization (optional - auto-detected if not provided) |
Implementation Reference
- src/tools/enhanced/index.ts:225-264 (handler)Executes the tool logic: initializes services (lifecycle, connection, tree), scans project for existing docs, builds document tree, sets timezone/locale, returns formatted success message with stats.tools.set('initialize_documentation_system', async (args: any) => { try { logger.info(`Initializing documentation system for: ${args.projectRoot}`); // Initialize database and services await lifecycleService.initialize(); await connectionService.initialize(); await treeService.initialize(); // Scan existing documentation const existingDocs = await scanExistingDocumentation(args.projectRoot); // Create initial document tree const documentTree = await treeService.buildTree(existingDocs); logger.info(`Documentation system initialized. Found ${existingDocs.length} documents.`); // Get current localization settings const currentConfig = localizationService.getConfig(); const timezone = args.timeZone || currentConfig.timezone; const locale = args.locale || currentConfig.locale; return { success: true, message: `β Enhanced Documentation System Initialized π Project Root: ${args.projectRoot} π€ AI Analysis: ${args.enableAI ? 'Enabled' : 'Disabled'} π Timezone: ${timezone} πΊοΈ Locale: ${locale} π Documents Found: ${existingDocs.length} π³ Document Tree Nodes: ${documentTree.length} The system is now ready to track documentation lifecycle, analyze work-document connections, and provide intelligent insights.` }; } catch (error) { logger.error('Failed to initialize documentation system:', error); throw error; } });
- src/types/enhanced.types.ts:98-103 (schema)Zod schema for input validation of the tool parameters: projectRoot (required), enableAI (default true), timeZone/locale (optional).export const InitializeDocumentationSystemSchema = z.object({ projectRoot: z.string(), enableAI: z.boolean().default(true), timeZone: z.string().optional(), // Auto-detected if not provided locale: z.string().optional(), // Auto-detected if not provided });
- src/tools/enhanced/index.ts:52-78 (registration)MCPTool definition: registers the tool name, description, and JSON inputSchema in the enhancedTools array returned by registerEnhancedTools function.{ name: 'initialize_documentation_system', description: 'Initialize the enhanced documentation automation system for a project', inputSchema: { type: 'object', properties: { projectRoot: { type: 'string', description: 'Root directory of the project' }, enableAI: { type: 'boolean', description: 'Enable AI-powered analysis features', default: true }, timeZone: { type: 'string', description: 'Timezone for date/time operations (optional - auto-detected if not provided)' }, locale: { type: 'string', description: 'Locale for internationalization (optional - auto-detected if not provided)' } }, required: ['projectRoot'] } },