Skip to main content
Glama

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
NameRequiredDescriptionDefault
projectRootYesRoot directory of the project
enableAINoEnable AI-powered analysis features
timeZoneNoTimezone for date/time operations (optional - auto-detected if not provided)
localeNoLocale for internationalization (optional - auto-detected if not provided)

Implementation Reference

  • 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;
        }
      });
  • 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
    });
  • 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']
      }
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Ghostseller/CastPlan_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server