generate_all_folder_maps
Create structured documentation maps for all project folders to enhance project awareness and organization within the MCP Memory Server.
Instructions
Generate _map.md files for all folders in the project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/folder-mapper.ts:101-111 (handler)Core handler function that initiates recursive generation of _map.md files for all folders starting from the src directory.async generateAllFolderMaps(): Promise<void> { const srcDir = path.join(this.projectRoot, 'src'); if (!await fs.pathExists(srcDir)) { console.log(chalk.yellow('⚠️ No src directory found')); return; } await this.generateFolderMapsRecursively(srcDir); console.log(chalk.green('✅ All folder maps generated successfully')); }
- src/index.ts:908-911 (handler)MCP server dispatcher/handler that receives tool calls and delegates to FolderMapper.generateAllFolderMaps().case 'generate_all_folder_maps': { await this.folderMapper.generateAllFolderMaps(); return { content: [{ type: 'text', text: 'All folder maps generated successfully' }] }; }
- src/index.ts:736-743 (registration)Tool registration in MCP server tool list, including name, description, and schema (no input parameters required).{ name: 'generate_all_folder_maps', description: 'Generate _map.md files for all folders in the project', inputSchema: { type: 'object', properties: {} } },
- src/folder-mapper.ts:214-230 (helper)Private recursive helper method that traverses directories, generates maps for folders with code files, and processes subdirectories.private async generateFolderMapsRecursively(dirPath: string): Promise<void> { const entries = await fs.readdir(dirPath, { withFileTypes: true }); const hasCodeFiles = await this.hasCodeFiles(dirPath); // Generate map for current folder if it has code files if (hasCodeFiles) { await this.generateFolderMap(dirPath); } // Recursively process subdirectories for (const entry of entries) { if (entry.isDirectory() && !this.shouldExcludeFolder(entry.name)) { const subDirPath = path.join(dirPath, entry.name); await this.generateFolderMapsRecursively(subDirPath); } } }