Skip to main content
Glama
nicavcrm

Memory Bank MCP Server

by nicavcrm

REFLECT+ARCHIVE Mode

reflect_archive_mode

Enable the Reflect or Archive function to review implementation details or organize documentation, streamlining project workflows on the Memory Bank MCP Server.

Instructions

Reflect on implementation and archive documentation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes

Implementation Reference

  • Implements the 'reflect' action of the reflect_archive_mode tool: generates a reflection document template, saves it, updates task status.
      private handleReflection(): Promise<ToolResponse> {
        const timestamp = new Date().toISOString();
        const reflectionDoc = `# Implementation Reflection
    
    ## Implementation Review
    **Completed**: ${timestamp}
    
    ### What Went Well (Successes)
    - *Document successful aspects of the implementation*
    
    ### Challenges Encountered
    - *Document difficulties and how they were resolved*
    
    ### Lessons Learned
    - *Key insights from this implementation*
    
    ### Process Improvements
    - *Suggestions for improving the development process*
    
    ### Technical Improvements
    - *Technical insights and potential optimizations*
    
    ## Comparison to Plan
    *How did the actual implementation compare to the original plan?*
    
    ## Final Status
    - [ ] Implementation complete
    - [ ] Testing complete
    - [ ] Documentation complete
    - [ ] Ready for archive
    
    **Next Step**: Type 'ARCHIVE NOW' to proceed with archiving.
    `;
    
        this.storage.writeFile('reflection.md', reflectionDoc);
    
        // Update tasks
        const currentTasks = this.storage.getTasks();
        const updatedTasks = currentTasks.replace(
          '- [ ] REFLECT+ARCHIVE Mode: Completion and documentation',
          '- [x] REFLECT+ARCHIVE Mode: Reflection complete ✅'
        );
        this.storage.setTasks(updatedTasks);
    
        return Promise.resolve({
          content: [{
            type: 'text',
            text: '✅ REFLECTION completed!\n\nReflection document created. Please review and complete the reflection sections, then use action "archive" to create the final archive.'
          }]
        });
      }
  • Implements the 'archive' action: gathers all project documents, creates comprehensive archive, updates status to completed, resets context.
      private handleArchiving(): Promise<ToolResponse> {
        const timestamp = new Date().toISOString();
        const tasks = this.storage.getTasks();
        const reflection = this.storage.readFile('reflection.md');
        const plan = this.storage.readFile('implementation-plan.md');
        const progress = this.storage.getProgress();
    
        // Create archive document
        const archiveDoc = `# Project Archive
    
    **Archived**: ${timestamp}
    
    ## Project Summary
    ${this.extractProjectSummary(tasks)}
    
    ## Implementation Plan
    ${plan}
    
    ## Implementation Progress
    ${progress}
    
    ## Reflection
    ${reflection}
    
    ## Final Status
    ✅ Project completed and archived
    
    ## Files Included
    - tasks.md
    - implementation-plan.md
    - progress.md
    - reflection.md
    - All creative phase documents
    
    ---
    *This archive represents the complete documentation of the project lifecycle.*
    `;
    
        this.storage.writeArchive(archiveDoc);
    
        // Update tasks - mark as COMPLETED
        const finalTasks = tasks.replace(
          'REFLECT+ARCHIVE Mode: Reflection complete ✅',
          'REFLECT+ARCHIVE Mode: Completed and Archived ✅'
        ).replace(
          'Current Phase: PLAN',
          'Current Phase: COMPLETED'
        );
        this.storage.setTasks(finalTasks);
    
        // Reset active context for next task
        this.storage.setActiveContext(`# Active Context
    
    ## Status: Ready for New Task
    Previous task has been completed and archived.
    
    **Next Steps**: Use VAN mode to initialize a new task.
    
    **Archive Location**: docs/archive/project-archive.md
    `);
    
        return Promise.resolve({
          content: [{
            type: 'text',
            text: '✅ ARCHIVING completed!\n\n📦 Project archived successfully\n📁 Archive location: docs/archive/project-archive.md\n\n🎉 Task fully completed! Ready for next task - use VAN mode to initialize.'
          }]
        });
      }
  • Dispatcher handler for reflect_archive_mode tool: routes to handleReflection or handleArchiving based on input.action.
    handler: async (input: ReflectArchiveInput): Promise<ToolResponse> => {
      if (input.action === 'reflect') {
        return this.handleReflection();
      } else if (input.action === 'archive') {
        return this.handleArchiving();
      }
    
      return {
        content: [{
          type: 'text',
          text: '❌ Invalid action. Use "reflect" or "archive".'
        }]
      };
    }
  • JSON Schema defining the input for the reflect_archive_mode tool, specifying the required 'action' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        action: {
          type: 'string',
          enum: ['reflect', 'archive'],
          description: 'reflect: Review implementation, archive: Create final documentation (requires ARCHIVE NOW command)'
        }
      },
      required: ['action']
    },
  • src/server.ts:93-104 (registration)
    MCP server registration of the reflect_archive_mode tool, including Zod input schema validation and handler binding.
      'reflect_archive_mode',
      {
        title: 'REFLECT+ARCHIVE Mode',
        description: 'Reflect on implementation and archive documentation',
        inputSchema: {
          action: z.enum(['reflect', 'archive'])
        }
      },
      async (args) => {
        return await (this.tools.reflectArchiveTool.handler as any)(args);
      }
    );
Behavior1/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. The description mentions 'reflect' and 'archive' but doesn't explain what these actions entail—whether they are read-only, destructive, require specific permissions, have side effects, or produce any output. This leaves critical behavioral traits completely unspecified.

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 with no wasted words. It's appropriately sized for a simple tool, though it could be more front-loaded with clearer purpose. The brevity is a strength, but it comes at the cost of clarity.

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 lack of annotations, no output schema, and a vague description, this tool's definition is incomplete. The description doesn't compensate for the missing structured data—it doesn't explain what happens when the tool is invoked, what results to expect, or how it differs from siblings. This leaves significant gaps for an agent to understand and use the tool effectively.

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

Parameters3/5

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

The description doesn't explicitly mention parameters, but the input schema has one parameter 'action' with enum values 'reflect' and 'archive', which align with the description's verbs. Since schema description coverage is 0%, the description adds minimal value by implying what the parameter might control, but it doesn't explain the semantics or differences between the two actions beyond the schema's enum.

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

Purpose2/5

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

The description 'Reflect on implementation and archive documentation' states a vague purpose with two possible actions but doesn't specify what resources are involved or what concrete outcomes occur. It's not tautological (doesn't just repeat the name/title), but it's too abstract to clearly understand what the tool actually does compared to its siblings like creative_mode or implement_mode.

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. It doesn't mention any context, prerequisites, or exclusions, leaving the agent with no information about appropriate usage scenarios relative to sibling tools like plan_mode or van_mode.

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