Skip to main content
Glama
nicavcrm

Memory Bank MCP Server

by nicavcrm

PLAN Mode

plan_mode

Generate tailored implementation plans based on project complexity, streamlining software development workflows with structured planning tools.

Instructions

Create detailed implementation plan based on complexity level

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
complexityNo

Implementation Reference

  • The core handler function for the 'plan_mode' tool. It retrieves current tasks, determines or uses provided complexity level, generates and stores the implementation plan, updates the tasks status, determines the next mode, and returns a success response.
    handler: async (input: PlanModeInput): Promise<ToolResponse> => {
      const currentTasks = this.storage.getTasks();
      const complexity = input.complexity || this.extractComplexityFromTasks(currentTasks);
    
      if (!complexity) {
        return {
          content: [{
            type: 'text',
            text: '❌ Error: Complexity level not found. Please run VAN mode first or specify complexity level.'
          }]
        };
      }
    
      const planTemplate = this.generatePlanTemplate(complexity);
      this.storage.setImplementationPlan(planTemplate);
    
      // Update tasks.md
      const updatedTasks = currentTasks.replace(
        '- [ ] PLAN Mode: Implementation planning',
        '- [x] PLAN Mode: Implementation planning ✅'
      ).replace(
        'Current Phase: VAN',
        'Current Phase: PLAN'
      );
    
      this.storage.setTasks(updatedTasks);
    
      const requiresCreative = complexity === '3' || complexity === '4';
      const nextMode = requiresCreative ? 'CREATIVE' : 'IMPLEMENT';
    
      return {
        content: [{
          type: 'text',
          text: `✅ PLAN Mode completed!\n\n**Implementation plan created** for Level ${complexity} complexity.\n**Next Mode**: ${nextMode}\n\n${requiresCreative ? 'Creative phases identified - design decisions required before implementation.' : 'Ready for direct implementation.'}`
        }]
      };
    }
  • JSON Schema definition for the input parameters of the 'plan_mode' tool, specifying the optional 'complexity' field.
    inputSchema: {
      type: 'object',
      properties: {
        complexity: {
          type: 'string',
          enum: ['1', '2', '3', '4'],
          description: 'Complexity level (optional, will read from tasks.md if not provided)'
        }
      }
    },
  • src/server.ts:40-54 (registration)
    Registration of the 'plan_mode' tool with the MCP server, including title, description, Zod input schema validation, and delegation to the handler from MemoryBankTools instance.
    this.server.registerTool(
      'plan_mode',
      {
        title: 'PLAN Mode',
        description: 'Create detailed implementation plan based on complexity level',
        inputSchema: {
          complexity: z.string().refine(val => ['1', '2', '3', '4'].includes(val), {
            message: 'Complexity must be 1, 2, 3, or 4'
          }).optional()
        }
      },
      async (args) => {
        return await (this.tools.planModeTool.handler as any)(args);
      }
    );
  • Key helper method called by the handler to generate complexity-specific implementation plan templates stored in implementation-plan.md.
      private generatePlanTemplate(complexity: string): string {
        const timestamp = new Date().toISOString();
    
        if (complexity === '1') {
          return `# Implementation Plan - Level 1 (Quick Fix)
    
    ## Overview
    Quick bug fix implementation plan.
    
    ## Implementation Steps
    1. Identify the bug location
    2. Implement targeted fix
    3. Test the fix
    4. Verify no regression
    
    ## Files to Modify
    *List files that need changes*
    
    ## Testing Strategy
    *How to verify the fix works*
    
    **Created**: ${timestamp}
    `;
        } else if (complexity === '2') {
          return `# Implementation Plan - Level 2 (Simple Enhancement)
    
    ## Overview of Changes
    *Describe what needs to be enhanced*
    
    ## Files to Modify
    *List files that need changes*
    
    ## Implementation Steps
    1. *Step 1*
    2. *Step 2*
    3. *Step 3*
    
    ## Potential Challenges
    *List any anticipated issues*
    
    ## Testing Strategy
    *How to test the enhancement*
    
    **Created**: ${timestamp}
    `;
        } else {
          return `# Implementation Plan - Level ${complexity} (Complex Feature)
    
    ## Requirements Analysis
    *Detailed requirements breakdown*
    
    ## Components Affected
    *List all components that will be modified or created*
    
    ## Architecture Considerations
    *High-level architectural decisions*
    
    ## Creative Phase Components
    *Components requiring design decisions:*
    - [ ] Architecture Design: *Component name*
    - [ ] Algorithm Design: *Component name*
    - [ ] UI/UX Design: *Component name*
    
    ## Implementation Strategy
    *Overall approach to implementation*
    
    ## Detailed Steps
    ### Phase 1: Core Components
    1. *Step 1*
    2. *Step 2*
    
    ### Phase 2: Secondary Components
    1. *Step 1*
    2. *Step 2*
    
    ### Phase 3: Integration & Polish
    1. *Step 1*
    2. *Step 2*
    
    ## Dependencies
    *External and internal dependencies*
    
    ## Challenges & Mitigations
    *Potential issues and solutions*
    
    **Created**: ${timestamp}
    `;
        }
      }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool creates a plan, implying a generative or analytical operation, but doesn't describe what 'detailed implementation plan' entails, whether it's a one-time or iterative process, or any constraints like rate limits or permissions needed. This is a significant gap for a tool with no annotation coverage.

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

Conciseness4/5

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

The description is a single, efficient sentence that front-loads the core action ('Create detailed implementation plan') without unnecessary words. However, it could be more structured by explicitly separating purpose from usage context, but it earns high marks for brevity and clarity within its limited scope.

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?

Given the tool's complexity (generating plans based on input), lack of annotations, no output schema, and incomplete parameter documentation, the description is inadequate. It doesn't explain what the output looks like, how the plan is structured, or any behavioral nuances, making it incomplete for effective agent use.

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

Parameters2/5

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

The input schema has one parameter ('complexity') with 0% description coverage, and the tool description doesn't add any meaning beyond what the schema provides. It mentions 'complexity level' but doesn't explain what values are expected, their format, or how they influence the plan creation. With low schema coverage, the description fails to compensate, leaving the parameter undocumented.

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

Purpose3/5

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

The description states the tool creates a detailed implementation plan based on complexity level, which is a clear purpose with a verb ('create') and resource ('implementation plan'). However, it doesn't distinguish this from sibling tools like 'creative_mode' or 'implement_mode', leaving ambiguity about how planning differs from implementation or creative tasks.

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?

No guidance is provided on when to use this tool versus alternatives like 'implement_mode' or 'creative_mode'. The description implies usage when a plan is needed based on complexity, but it doesn't specify contexts, prerequisites, or exclusions, leaving the agent to guess about appropriate scenarios.

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

Related 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/nicavcrm/memory-bank-mcp'

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