Skip to main content
Glama
ipospelov

Memory Bank MCP Server

generate_memory_bank_template

Create structured templates for Memory Bank files to organize project documentation and preserve context in AI assistant environments.

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
NameRequiredDescriptionDefault
file_nameYes

Implementation Reference

  • The handler function decorated with @mcp.tool(), implementing the core logic to generate a Memory Bank template based on the provided file_name by returning from the TEMPLATES dict or an error message.
    @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}"
  • Dictionary mapping file names to template strings, imported from various template modules, used by the generate_memory_bank_template handler.
    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 }
  • The @mcp.tool() decorator registers the generate_memory_bank_template function as an MCP tool.
    @mcp.tool()

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

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