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()
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 mentions generating a template but does not specify what the template includes, how it is formatted, whether it overwrites existing files, or any permissions required. For a tool with no annotations, this leaves significant gaps in understanding its behavior and effects.

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 appropriately sized and front-loaded, with a clear purpose statement followed by parameter details. It avoids unnecessary verbosity, but the parameter explanation could be more integrated into the main text rather than listed separately. Overall, it is efficient with minimal waste.

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 low schema description coverage, the description is incomplete. It does not explain what the generated template looks like, how it is delivered, or any error conditions. For a tool that creates content, more context is needed to guide effective use.

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 adds minimal meaning beyond the input schema. It explains that 'file_name' is 'The name of the file to generate a template for' and provides an example ('e.g., "projectbrief.md"'), which clarifies the parameter's purpose. However, with 0% schema description coverage, this is insufficient to fully compensate, as it doesn't detail constraints or expected formats beyond the example.

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 a template for a specific Memory Bank file.' It specifies the verb ('Generate') and resource ('template for a specific Memory Bank file'), making it easy to understand what the tool does. However, it does not explicitly differentiate from sibling tools like 'analyze_project_summary' or 'get_memory_bank_structure', which might offer related functionality.

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 lacks context about scenarios where generating a template is appropriate, prerequisites, or comparisons to sibling tools. This absence of usage instructions leaves the agent without clear direction on tool selection.

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

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