Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

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

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/keleshteri/mcp-memory'

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