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);
        }
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Generate' implies a write operation, it doesn't specify whether this is destructive (overwrites existing files), requires specific permissions, has side effects, or provides any output format. The description lacks crucial behavioral context for a tool that presumably creates or modifies files.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states exactly what the tool does with no wasted words. It's front-loaded with the core action and target, making it immediately comprehensible while remaining appropriately brief for a parameterless tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool that presumably creates or modifies files across an entire project, the description is insufficient given the absence of annotations and output schema. It doesn't explain what the generated files contain, how they're structured, where they're placed, or what happens if files already exist. The description leaves too many behavioral questions unanswered for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't mention parameters since none exist, earning a baseline score of 4 for not introducing confusion or redundancy.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Generate') and target resource ('_map.md files for all folders in the project'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from the sibling tool 'generate_folder_map', which appears to be a single-folder version, leaving some ambiguity about when to choose one over the other.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'generate_folder_map' (which likely handles individual folders). There's no mention of prerequisites, timing considerations, or typical use cases, leaving the agent to infer usage context from the tool name alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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