initialize_documentation_system
Sets up project documentation automation by initializing system features, including AI-powered analysis, in the specified project directory. Integrates with CastPlan MCP for context-aware assistance.
Instructions
Initialize the enhanced documentation automation system for a project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| enableAI | No | Enable AI-powered analysis features | |
| locale | No | Locale for internationalization (optional - auto-detected if not provided) | |
| projectRoot | Yes | Root directory of the project | |
| timeZone | No | Timezone for date/time operations (optional - auto-detected if not provided) |
Implementation Reference
- src/tools/enhanced/index.ts:225-264 (handler)The main execution handler for the 'initialize_documentation_system' tool. Initializes services, scans project for existing documentation, builds document tree, and returns initialization status.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 defining the input parameters for the initialize_documentation_system tool, including projectRoot (required), enableAI, timeZone, and locale.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 metadata registration for 'initialize_documentation_system', including name, description, and JSON input schema used for tool registration.{ 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'] } },