generate_memory_bank_template
Create structured templates for Memory Bank files to preserve context and improve project documentation.
Instructions
Generate a template for a specific Memory Bank file.
Args:
file_name: The name of the file to generate a template for (e.g., "projectbrief.md")
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_name | Yes |
Implementation Reference
- src/mcp_memory_bank/main.py:42-53 (handler)The main handler function for the 'generate_memory_bank_template' tool, decorated with @mcp.tool(). It retrieves and returns a template string from the TEMPLATES dictionary based on the provided file_name, or an error message listing available templates.@mcp.tool() async def generate_memory_bank_template(file_name: str) -> str: """Generate a template for a specific Memory Bank file. Args: file_name: The name of the file to generate a template for (e.g., "projectbrief.md") """ if file_name in TEMPLATES: return TEMPLATES[file_name] else: available_templates = ", ".join(TEMPLATES.keys()) return f"Template for {file_name} not found. Available templates: {available_templates}"
- src/mcp_memory_bank/main.py:18-26 (helper)Dictionary mapping file names to template strings imported from various template modules, used by the generate_memory_bank_template handler to provide the actual template content.TEMPLATES = { "memory_bank_instructions.md": MEMORY_BANK_INSTRUCTIONS_TEMPLATE, "projectbrief.md": PROJECTBRIEF_TEMPLATE, "productContext.md": PRODUCT_CONTEXT_TEMPLATE, "activeContext.md": ACTIVE_CONTEXT_TEMPLATE, "systemPatterns.md": SYSTEM_PATTERNS_TEMPLATE, "techContext.md": TECH_CONTEXT_TEMPLATE, "progress.md": PROGRESS_TEMPLATE }