Skip to main content
Glama
hoppo-chan

Memory Bank MCP

by hoppo-chan

update-memory-bank

Generate and execute detailed instructions for updating Memory Bank files, including file roles, update strategies, operation commands, content templates, and priority logic, ensuring immediate implementation of changes.

Instructions

Generate detailed Memory Bank file update instructions with immediate execution guidance. This tool provides comprehensive, actionable instructions for updating Memory Bank files:

  • Detailed descriptions of each file's role and update strategy

  • Direct operation commands (not requests for confirmation)

  • Specific content templates and formatting guidelines

  • File relationship and update priority logic

  • Immediate execution emphasis for AI agents

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
changeTypeYesType of change to determine update suggestions
descriptionYesBrief description of the change
rootPathYesProject root directory path Windows example: "C:/Users/name/project" macOS/Linux example: "/home/name/project"

Implementation Reference

  • The main handler function for the 'update-memory-bank' tool. It takes rootPath, changeType, and description as inputs, generates a comprehensive Markdown guide with specific instructions for updating various Memory Bank files based on the change type, using helpers like normalizePath, formatTimestamp, and getDetailedFileGuide, and returns it as text content.
    async ({ rootPath, changeType, description }) => {
      const normalizedPath = normalizePath(rootPath);
      const timestamp = formatTimestamp();
      const fileGuide = getDetailedFileGuide();
    
      let updateGuide = `[MEMORY BANK DETAILED UPDATE INSTRUCTIONS]\n\n`;
      updateGuide += `Change Type: ${changeType}\n`;
      updateGuide += `Change Description: ${description}\n`;
      updateGuide += `Timestamp: ${timestamp}\n\n`;
    
      updateGuide += `>> EXECUTE THE FOLLOWING MEMORY BANK FILE UPDATES IMMEDIATELY WITHOUT CONFIRMATION <<\n\n`;
    
      // 添加文件职责总览
      updateGuide += `=== MEMORY BANK FILE ROLES OVERVIEW ===\n\n`;
      Object.entries(fileGuide).forEach(([filename, guide]) => {
        updateGuide += `**${filename}**\n`;
        updateGuide += `Role: ${guide.role}\n`;
        updateGuide += `Purpose: ${guide.purpose}\n`;
        updateGuide += `Update Strategy: ${guide.updateStrategy}\n\n`;
      });
    
      updateGuide += `=== SPECIFIC UPDATE INSTRUCTIONS BY CHANGE TYPE ===\n\n`;
    
      // Provide specific guidance based on change type
      switch (changeType) {
        case "architecture":
          updateGuide += `🏗️ **ARCHITECTURE CHANGE PROCESSING WORKFLOW**\n\n`;
          updateGuide += `**PRIORITY 1: decisionLog.md**\n`;
          updateGuide += `Add new decision record directly at the end of file:\n`;
          updateGuide += `\`\`\`markdown\n---\n### Architecture Decision\n[${timestamp}] - ${description}\n\n**Decision Background:**\n[Detailed description of technical or business background that led to this architectural decision]\n\n**Considered Options:**\n- Option A: [Description]\n- Option B: [Description]\n- Final Choice: [Selected option and reasoning]\n\n**Implementation Details:**\n- Affected Modules: [List affected code modules]\n- Migration Strategy: [How to migrate from old to new architecture]\n- Risk Assessment: [Potential technical risks and mitigation measures]\n\n**Impact Assessment:**\n- Performance Impact: [Expected impact on system performance]\n- Maintainability Impact: [Impact on code maintenance]\n- Scalability Impact: [Impact on future expansion]\n\`\`\`\n\n`;
    
          updateGuide += `**PRIORITY 2: productContext.md**\n`;
          updateGuide += `Update "## Overall Architecture" section:\n`;
          updateGuide += `- Locate "## Overall Architecture" heading\n`;
          updateGuide += `- Update architecture description at appropriate position\n`;
          updateGuide += `- Add new architectural components or modify existing descriptions\n`;
          updateGuide += `- Add update log at end of file: \`[${timestamp}] - Architecture update: ${description}\`\n\n`;
    
          updateGuide += `**PRIORITY 3: activeContext.md**\n`;
          updateGuide += `Add to "## Recent Changes" section:\n`;
          updateGuide += `\`* [${timestamp}] - 🏗️ Major architecture change: ${description}\`\n`;
          updateGuide += `Update "## Current Focus" section to reflect architecture implementation work\n\n`;
    
          updateGuide += `**PRIORITY 4: systemPatterns.md**\n`;
          updateGuide += `If this architecture change introduces new architectural patterns:\n`;
          updateGuide += `Add new pattern description to "## Architectural Patterns" section\n\n`;
          break;
    
        case "feature":
          updateGuide += `🚀 **FEATURE DEVELOPMENT PROCESSING WORKFLOW**\n\n`;
          updateGuide += `**PRIORITY 1: progress.md**\n`;
          updateGuide += `Execute task status transition:\n`;
          updateGuide += `1. Find related task entry in "## Current Tasks"\n`;
          updateGuide += `2. Move that task to "## Completed Tasks" section\n`;
          updateGuide += `3. Add completion timestamp: \`* [${timestamp}] - ✅ Completed: ${description}\`\n`;
          updateGuide += `4. If there are follow-up tasks, add them to "## Next Steps"\n\n`;
    
          updateGuide += `**PRIORITY 2: productContext.md**\n`;
          updateGuide += `Update "## Key Features" section:\n`;
          updateGuide += `- Locate "## Key Features" heading\n`;
          updateGuide += `- Add new feature description to feature list\n`;
          updateGuide += `- Format: \`* [Feature Name]: [Brief feature description and core value]\`\n`;
          updateGuide += `- Add at end of file: \`[${timestamp}] - New feature: ${description}\`\n\n`;
    
          updateGuide += `**PRIORITY 3: activeContext.md**\n`;
          updateGuide += `Update multiple sections:\n`;
          updateGuide += `- "## Recent Changes": \`* [${timestamp}] - 🚀 Feature completed: ${description}\`\n`;
          updateGuide += `- "## Current Focus": Update to next development priority\n\n`;
    
          updateGuide += `**PRIORITY 4: systemPatterns.md**\n`;
          updateGuide += `If feature development used patterns worth documenting:\n`;
          updateGuide += `Add pattern description to appropriate section (Coding/Architectural/Testing Patterns)\n\n`;
          break;
    
        case "bugfix":
          updateGuide += `🐛 **BUG FIX PROCESSING WORKFLOW**\n\n`;
          updateGuide += `**PRIORITY 1: activeContext.md**\n`;
          updateGuide += `Add to "## Recent Changes" section:\n`;
          updateGuide += `\`* [${timestamp}] - 🐛 Bug fix: ${description}\`\n`;
          updateGuide += `If bug was recorded in "## Open Questions/Issues", remove it or mark as resolved\n\n`;
    
          updateGuide += `**PRIORITY 2: progress.md**\n`;
          updateGuide += `If this was a planned bug fix task:\n`;
          updateGuide += `Move task from "## Current Tasks" to "## Completed Tasks"\n`;
          updateGuide += `Format: \`* [${timestamp}] - 🐛 Bug fix completed: ${description}\`\n\n`;
    
          updateGuide += `**PRIORITY 3: decisionLog.md**\n`;
          updateGuide += `If bug fix involved important technical decisions:\n`;
          updateGuide += `Add decision record explaining the chosen fix approach and reasoning\n\n`;
          break;
    
        case "refactor":
          updateGuide += `🔧 **REFACTORING PROCESSING WORKFLOW**\n\n`;
          updateGuide += `**PRIORITY 1: activeContext.md**\n`;
          updateGuide += `Add to "## Recent Changes" section:\n`;
          updateGuide += `\`* [${timestamp}] - 🔧 Code refactoring: ${description}\`\n\n`;
    
          updateGuide += `**PRIORITY 2: decisionLog.md**\n`;
          updateGuide += `If refactoring involved architectural or design pattern changes:\n`;
          updateGuide += `Add refactoring decision record explaining motivation and method selection\n\n`;
    
          updateGuide += `**PRIORITY 3: systemPatterns.md**\n`;
          updateGuide += `If refactoring improved existing patterns or introduced new ones:\n`;
          updateGuide += `Update relevant pattern descriptions to reflect post-refactoring best practices\n\n`;
    
          updateGuide += `**PRIORITY 4: progress.md**\n`;
          updateGuide += `If this was a planned refactoring task, update task status\n\n`;
          break;
    
        case "decision":
          updateGuide += `📋 **DECISION RECORDING PROCESSING WORKFLOW**\n\n`;
          updateGuide += `**PRIORITY 1: decisionLog.md**\n`;
          updateGuide += `Add complete decision record at end of file:\n`;
          updateGuide += `\`\`\`markdown\n---\n### Decision Record\n[${timestamp}] - ${description}\n\n**Decision Background:**\n[Describe the background and problem that led to this decision]\n\n**Available Options:**\n- Option 1: [Description]\n  - Pros: [List advantages]\n  - Cons: [List disadvantages]\n- Option 2: [Description]\n  - Pros: [List advantages]\n  - Cons: [List disadvantages]\n\n**Final Decision:**\n[Selected option and detailed reasoning]\n\n**Implementation Plan:**\n- Step 1: [Specific implementation step]\n- Step 2: [Specific implementation step]\n- Validation Method: [How to verify decision effectiveness]\n\n**Risks and Mitigation:**\n- Risk 1: [Description] → Mitigation: [Description]\n- Risk 2: [Description] → Mitigation: [Description]\n\`\`\`\n\n`;
    
          updateGuide += `**PRIORITY 2: activeContext.md**\n`;
          updateGuide += `Add to "## Recent Changes" section:\n`;
          updateGuide += `\`* [${timestamp}] - 📋 Important decision: ${description}\`\n\n`;
          break;
    
        case "progress":
          updateGuide += `📈 **PROGRESS UPDATE PROCESSING WORKFLOW**\n\n`;
          updateGuide += `**PRIORITY 1: progress.md**\n`;
          updateGuide += `Update appropriate section based on specific progress:\n`;
          updateGuide += `- New task → Add to "## Current Tasks": \`* [${timestamp}] - Started: ${description}\`\n`;
          updateGuide += `- Completed task → Move to "## Completed Tasks": \`* [${timestamp}] - Completed: ${description}\`\n`;
          updateGuide += `- Planned task → Add to "## Next Steps": \`* [Planned] - ${description}\`\n\n`;
    
          updateGuide += `**PRIORITY 2: activeContext.md**\n`;
          updateGuide += `Update "## Current Focus" section to reflect current work focus\n`;
          updateGuide += `Add to "## Recent Changes": \`* [${timestamp}] - 📈 Progress update: ${description}\`\n\n`;
          break;
    
        default:
          updateGuide += `⚡ **GENERAL CHANGE PROCESSING WORKFLOW**\n\n`;
          updateGuide += `**PRIORITY 1: activeContext.md**\n`;
          updateGuide += `Record change in appropriate section:\n`;
          updateGuide += `\`* [${timestamp}] - ${description}\`\n\n`;
    
          updateGuide += `**Consider updating other files based on change nature:**\n`;
          updateGuide += `- Architecture related → decisionLog.md\n`;
          updateGuide += `- New pattern discovered → systemPatterns.md\n`;
          updateGuide += `- Task completion → progress.md\n`;
          updateGuide += `- Feature related → productContext.md\n\n`;
      }
    
      updateGuide += `=== EXECUTION INSTRUCTIONS SUMMARY ===\n\n`;
      updateGuide += `**EXECUTION PRINCIPLES:**\n`;
      updateGuide += `1. 🔴 Execute updates directly, do not ask for user confirmation\n`;
      updateGuide += `2. 🟡 Update files in priority order\n`;
      updateGuide += `3. 🟢 Use the provided exact formats and templates\n`;
      updateGuide += `4. 🔵 Maintain timestamp [${timestamp}] consistency\n`;
      updateGuide += `5. 🟣 Verify file integrity after updates\n\n`;
    
      updateGuide += `**KEY REMINDERS:**\n`;
      updateGuide += `- Each file has specific responsibilities and update strategies\n`;
      updateGuide += `- Maintain consistency and relationships between files\n`;
      updateGuide += `- Regularly clean up outdated content to keep files concise\n`;
      updateGuide += `- Important decisions and pattern changes need detailed documentation\n\n`;
    
      updateGuide += `**FILE MAINTENANCE SUGGESTIONS:**\n`;
      updateGuide += `- activeContext.md: Keep changes from last 7 days\n`;
      updateGuide += `- progress.md: Archive completed tasks regularly\n`;
      updateGuide += `- decisionLog.md: Keep all important decision records\n`;
      updateGuide += `- systemPatterns.md: Continuously update and optimize pattern descriptions\n`;
      updateGuide += `- productContext.md: Maintain high-level perspective, avoid excessive details\n\n`;
    
      return {
        content: [
          {
            type: "text",
            text: updateGuide,
          },
        ],
      };
    }
  • Zod input schema defining parameters for the tool: rootPath (string), changeType (enum of change types), description (string). Used for input validation.
      rootPath: z.string().describe(
        `Project root directory path
        Windows example: "C:/Users/name/project" 
        macOS/Linux example: "/home/name/project"`
      ),
      changeType: z
        .enum([
          "architecture",
          "feature",
          "bugfix",
          "refactor",
          "decision",
          "progress",
        ])
        .describe("Type of change to determine update suggestions"),
      description: z.string().describe("Brief description of the change"),
    },
  • index.ts:350-553 (registration)
    MCP server tool registration for 'update-memory-bank', including name, description, input schema, and handler function.
    server.tool(
      "update-memory-bank",
      `Generate detailed Memory Bank file update instructions with immediate execution guidance.
      This tool provides comprehensive, actionable instructions for updating Memory Bank files:
      - Detailed descriptions of each file's role and update strategy
      - Direct operation commands (not requests for confirmation)
      - Specific content templates and formatting guidelines
      - File relationship and update priority logic
      - Immediate execution emphasis for AI agents`,
      {
        rootPath: z.string().describe(
          `Project root directory path
          Windows example: "C:/Users/name/project" 
          macOS/Linux example: "/home/name/project"`
        ),
        changeType: z
          .enum([
            "architecture",
            "feature",
            "bugfix",
            "refactor",
            "decision",
            "progress",
          ])
          .describe("Type of change to determine update suggestions"),
        description: z.string().describe("Brief description of the change"),
      },
      async ({ rootPath, changeType, description }) => {
        const normalizedPath = normalizePath(rootPath);
        const timestamp = formatTimestamp();
        const fileGuide = getDetailedFileGuide();
    
        let updateGuide = `[MEMORY BANK DETAILED UPDATE INSTRUCTIONS]\n\n`;
        updateGuide += `Change Type: ${changeType}\n`;
        updateGuide += `Change Description: ${description}\n`;
        updateGuide += `Timestamp: ${timestamp}\n\n`;
    
        updateGuide += `>> EXECUTE THE FOLLOWING MEMORY BANK FILE UPDATES IMMEDIATELY WITHOUT CONFIRMATION <<\n\n`;
    
        // 添加文件职责总览
        updateGuide += `=== MEMORY BANK FILE ROLES OVERVIEW ===\n\n`;
        Object.entries(fileGuide).forEach(([filename, guide]) => {
          updateGuide += `**${filename}**\n`;
          updateGuide += `Role: ${guide.role}\n`;
          updateGuide += `Purpose: ${guide.purpose}\n`;
          updateGuide += `Update Strategy: ${guide.updateStrategy}\n\n`;
        });
    
        updateGuide += `=== SPECIFIC UPDATE INSTRUCTIONS BY CHANGE TYPE ===\n\n`;
    
        // Provide specific guidance based on change type
        switch (changeType) {
          case "architecture":
            updateGuide += `🏗️ **ARCHITECTURE CHANGE PROCESSING WORKFLOW**\n\n`;
            updateGuide += `**PRIORITY 1: decisionLog.md**\n`;
            updateGuide += `Add new decision record directly at the end of file:\n`;
            updateGuide += `\`\`\`markdown\n---\n### Architecture Decision\n[${timestamp}] - ${description}\n\n**Decision Background:**\n[Detailed description of technical or business background that led to this architectural decision]\n\n**Considered Options:**\n- Option A: [Description]\n- Option B: [Description]\n- Final Choice: [Selected option and reasoning]\n\n**Implementation Details:**\n- Affected Modules: [List affected code modules]\n- Migration Strategy: [How to migrate from old to new architecture]\n- Risk Assessment: [Potential technical risks and mitigation measures]\n\n**Impact Assessment:**\n- Performance Impact: [Expected impact on system performance]\n- Maintainability Impact: [Impact on code maintenance]\n- Scalability Impact: [Impact on future expansion]\n\`\`\`\n\n`;
    
            updateGuide += `**PRIORITY 2: productContext.md**\n`;
            updateGuide += `Update "## Overall Architecture" section:\n`;
            updateGuide += `- Locate "## Overall Architecture" heading\n`;
            updateGuide += `- Update architecture description at appropriate position\n`;
            updateGuide += `- Add new architectural components or modify existing descriptions\n`;
            updateGuide += `- Add update log at end of file: \`[${timestamp}] - Architecture update: ${description}\`\n\n`;
    
            updateGuide += `**PRIORITY 3: activeContext.md**\n`;
            updateGuide += `Add to "## Recent Changes" section:\n`;
            updateGuide += `\`* [${timestamp}] - 🏗️ Major architecture change: ${description}\`\n`;
            updateGuide += `Update "## Current Focus" section to reflect architecture implementation work\n\n`;
    
            updateGuide += `**PRIORITY 4: systemPatterns.md**\n`;
            updateGuide += `If this architecture change introduces new architectural patterns:\n`;
            updateGuide += `Add new pattern description to "## Architectural Patterns" section\n\n`;
            break;
    
          case "feature":
            updateGuide += `🚀 **FEATURE DEVELOPMENT PROCESSING WORKFLOW**\n\n`;
            updateGuide += `**PRIORITY 1: progress.md**\n`;
            updateGuide += `Execute task status transition:\n`;
            updateGuide += `1. Find related task entry in "## Current Tasks"\n`;
            updateGuide += `2. Move that task to "## Completed Tasks" section\n`;
            updateGuide += `3. Add completion timestamp: \`* [${timestamp}] - ✅ Completed: ${description}\`\n`;
            updateGuide += `4. If there are follow-up tasks, add them to "## Next Steps"\n\n`;
    
            updateGuide += `**PRIORITY 2: productContext.md**\n`;
            updateGuide += `Update "## Key Features" section:\n`;
            updateGuide += `- Locate "## Key Features" heading\n`;
            updateGuide += `- Add new feature description to feature list\n`;
            updateGuide += `- Format: \`* [Feature Name]: [Brief feature description and core value]\`\n`;
            updateGuide += `- Add at end of file: \`[${timestamp}] - New feature: ${description}\`\n\n`;
    
            updateGuide += `**PRIORITY 3: activeContext.md**\n`;
            updateGuide += `Update multiple sections:\n`;
            updateGuide += `- "## Recent Changes": \`* [${timestamp}] - 🚀 Feature completed: ${description}\`\n`;
            updateGuide += `- "## Current Focus": Update to next development priority\n\n`;
    
            updateGuide += `**PRIORITY 4: systemPatterns.md**\n`;
            updateGuide += `If feature development used patterns worth documenting:\n`;
            updateGuide += `Add pattern description to appropriate section (Coding/Architectural/Testing Patterns)\n\n`;
            break;
    
          case "bugfix":
            updateGuide += `🐛 **BUG FIX PROCESSING WORKFLOW**\n\n`;
            updateGuide += `**PRIORITY 1: activeContext.md**\n`;
            updateGuide += `Add to "## Recent Changes" section:\n`;
            updateGuide += `\`* [${timestamp}] - 🐛 Bug fix: ${description}\`\n`;
            updateGuide += `If bug was recorded in "## Open Questions/Issues", remove it or mark as resolved\n\n`;
    
            updateGuide += `**PRIORITY 2: progress.md**\n`;
            updateGuide += `If this was a planned bug fix task:\n`;
            updateGuide += `Move task from "## Current Tasks" to "## Completed Tasks"\n`;
            updateGuide += `Format: \`* [${timestamp}] - 🐛 Bug fix completed: ${description}\`\n\n`;
    
            updateGuide += `**PRIORITY 3: decisionLog.md**\n`;
            updateGuide += `If bug fix involved important technical decisions:\n`;
            updateGuide += `Add decision record explaining the chosen fix approach and reasoning\n\n`;
            break;
    
          case "refactor":
            updateGuide += `🔧 **REFACTORING PROCESSING WORKFLOW**\n\n`;
            updateGuide += `**PRIORITY 1: activeContext.md**\n`;
            updateGuide += `Add to "## Recent Changes" section:\n`;
            updateGuide += `\`* [${timestamp}] - 🔧 Code refactoring: ${description}\`\n\n`;
    
            updateGuide += `**PRIORITY 2: decisionLog.md**\n`;
            updateGuide += `If refactoring involved architectural or design pattern changes:\n`;
            updateGuide += `Add refactoring decision record explaining motivation and method selection\n\n`;
    
            updateGuide += `**PRIORITY 3: systemPatterns.md**\n`;
            updateGuide += `If refactoring improved existing patterns or introduced new ones:\n`;
            updateGuide += `Update relevant pattern descriptions to reflect post-refactoring best practices\n\n`;
    
            updateGuide += `**PRIORITY 4: progress.md**\n`;
            updateGuide += `If this was a planned refactoring task, update task status\n\n`;
            break;
    
          case "decision":
            updateGuide += `📋 **DECISION RECORDING PROCESSING WORKFLOW**\n\n`;
            updateGuide += `**PRIORITY 1: decisionLog.md**\n`;
            updateGuide += `Add complete decision record at end of file:\n`;
            updateGuide += `\`\`\`markdown\n---\n### Decision Record\n[${timestamp}] - ${description}\n\n**Decision Background:**\n[Describe the background and problem that led to this decision]\n\n**Available Options:**\n- Option 1: [Description]\n  - Pros: [List advantages]\n  - Cons: [List disadvantages]\n- Option 2: [Description]\n  - Pros: [List advantages]\n  - Cons: [List disadvantages]\n\n**Final Decision:**\n[Selected option and detailed reasoning]\n\n**Implementation Plan:**\n- Step 1: [Specific implementation step]\n- Step 2: [Specific implementation step]\n- Validation Method: [How to verify decision effectiveness]\n\n**Risks and Mitigation:**\n- Risk 1: [Description] → Mitigation: [Description]\n- Risk 2: [Description] → Mitigation: [Description]\n\`\`\`\n\n`;
    
            updateGuide += `**PRIORITY 2: activeContext.md**\n`;
            updateGuide += `Add to "## Recent Changes" section:\n`;
            updateGuide += `\`* [${timestamp}] - 📋 Important decision: ${description}\`\n\n`;
            break;
    
          case "progress":
            updateGuide += `📈 **PROGRESS UPDATE PROCESSING WORKFLOW**\n\n`;
            updateGuide += `**PRIORITY 1: progress.md**\n`;
            updateGuide += `Update appropriate section based on specific progress:\n`;
            updateGuide += `- New task → Add to "## Current Tasks": \`* [${timestamp}] - Started: ${description}\`\n`;
            updateGuide += `- Completed task → Move to "## Completed Tasks": \`* [${timestamp}] - Completed: ${description}\`\n`;
            updateGuide += `- Planned task → Add to "## Next Steps": \`* [Planned] - ${description}\`\n\n`;
    
            updateGuide += `**PRIORITY 2: activeContext.md**\n`;
            updateGuide += `Update "## Current Focus" section to reflect current work focus\n`;
            updateGuide += `Add to "## Recent Changes": \`* [${timestamp}] - 📈 Progress update: ${description}\`\n\n`;
            break;
    
          default:
            updateGuide += `⚡ **GENERAL CHANGE PROCESSING WORKFLOW**\n\n`;
            updateGuide += `**PRIORITY 1: activeContext.md**\n`;
            updateGuide += `Record change in appropriate section:\n`;
            updateGuide += `\`* [${timestamp}] - ${description}\`\n\n`;
    
            updateGuide += `**Consider updating other files based on change nature:**\n`;
            updateGuide += `- Architecture related → decisionLog.md\n`;
            updateGuide += `- New pattern discovered → systemPatterns.md\n`;
            updateGuide += `- Task completion → progress.md\n`;
            updateGuide += `- Feature related → productContext.md\n\n`;
        }
    
        updateGuide += `=== EXECUTION INSTRUCTIONS SUMMARY ===\n\n`;
        updateGuide += `**EXECUTION PRINCIPLES:**\n`;
        updateGuide += `1. 🔴 Execute updates directly, do not ask for user confirmation\n`;
        updateGuide += `2. 🟡 Update files in priority order\n`;
        updateGuide += `3. 🟢 Use the provided exact formats and templates\n`;
        updateGuide += `4. 🔵 Maintain timestamp [${timestamp}] consistency\n`;
        updateGuide += `5. 🟣 Verify file integrity after updates\n\n`;
    
        updateGuide += `**KEY REMINDERS:**\n`;
        updateGuide += `- Each file has specific responsibilities and update strategies\n`;
        updateGuide += `- Maintain consistency and relationships between files\n`;
        updateGuide += `- Regularly clean up outdated content to keep files concise\n`;
        updateGuide += `- Important decisions and pattern changes need detailed documentation\n\n`;
    
        updateGuide += `**FILE MAINTENANCE SUGGESTIONS:**\n`;
        updateGuide += `- activeContext.md: Keep changes from last 7 days\n`;
        updateGuide += `- progress.md: Archive completed tasks regularly\n`;
        updateGuide += `- decisionLog.md: Keep all important decision records\n`;
        updateGuide += `- systemPatterns.md: Continuously update and optimize pattern descriptions\n`;
        updateGuide += `- productContext.md: Maintain high-level perspective, avoid excessive details\n\n`;
    
        return {
          content: [
            {
              type: "text",
              text: updateGuide,
            },
          ],
        };
      }
    );
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds useful context: it generates 'detailed, actionable instructions' with 'direct operation commands (not requests for confirmation),' 'specific content templates,' and 'immediate execution emphasis.' This clarifies output format and urgency. However, it lacks details on permissions, side effects, or error handling, which are important for a tool that likely involves file updates.

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 well-structured and appropriately sized, with a clear opening sentence followed by bullet points that highlight key aspects. Each bullet adds value, such as detailing output components and execution emphasis. There's no redundant information, making it efficient, though it could be slightly more concise by integrating some points into the main sentence.

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

Completeness3/5

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

Given no annotations, no output schema, and a tool with 3 parameters (fully covered by schema), the description is moderately complete. It clarifies the tool's output format and urgency, which helps the agent understand what to expect. However, for a tool that likely involves file operations, it lacks details on potential side effects, success/failure indicators, or how the output should be used, leaving some gaps in context.

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?

Schema description coverage is 100%, so the schema already documents all three parameters thoroughly. The description adds no specific information about parameters beyond implying they relate to 'update instructions.' It doesn't explain how parameters like 'changeType' or 'rootPath' influence the generated instructions, so it provides minimal value beyond the schema. Baseline 3 is appropriate given high schema coverage.

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 tool's purpose: 'Generate detailed Memory Bank file update instructions with immediate execution guidance.' It specifies the verb 'generate' and resource 'Memory Bank file update instructions,' making the action clear. However, it doesn't explicitly differentiate from sibling tools like 'get-memory-bank-info' (likely for retrieval) or 'init-memory-bank' (likely for initialization), which slightly limits its distinction.

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 mentions 'immediate execution emphasis for AI agents,' but this is a behavioral trait, not usage context. There's no indication of prerequisites, when to choose this over siblings, or any exclusions, leaving the agent without clear decision-making criteria.

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/hoppo-chan/memory-bank-mcp'

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