Skip to main content
Glama
akaiserg

MCP Memory Tracker

by akaiserg

save_memory

Store conversation memories in a vector database for persistent recall across sessions, enabling AI assistants to maintain context and reference past interactions.

Instructions

Save a memory to the vector store.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memoryYes

Implementation Reference

  • server.py:24-36 (handler)
    The main handler function for the 'save_memory' tool. It creates or retrieves a vector store named 'memories', writes the input memory to a temporary file, uploads it to the vector store using OpenAI's API, and returns a success status with the vector store ID.
    @mcp.tool()
    def save_memory(memory: str):
        """Save a memory to the vector store."""
        vector_store = get_or_create_vector_store()
        with tempfile.NamedTemporaryFile(mode="w+", delete=False, suffix=".txt") as f:
            f.write(memory)
            f.flush()
            client.vector_stores.files.upload_and_poll(
    
                vector_store_id=vector_store.id,
                file=open(f.name, "rb"),
            )
        return {"status": "saved", "vector store id": vector_store.id}
  • server.py:24-24 (registration)
    The @mcp.tool() decorator registers the save_memory function as an MCP tool.
    @mcp.tool()
  • Helper function to get an existing vector store named 'memories' or create a new one if it doesn't exist. Used by save_memory.
    def get_or_create_vector_store():
        stores = client.vector_stores.list()
        for store in stores:
            if store.name == VECTOR_STORE_NAME:
                return store
        return client.vector_stores.create(name=VECTOR_STORE_NAME)
Behavior2/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 states the action is to 'Save' but doesn't mention whether this is a write operation, what permissions are needed, if it's idempotent, or what happens on success/failure. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single sentence that directly states the tool's purpose. There's no wasted language or unnecessary elaboration, making it efficiently front-loaded and easy to parse.

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 this is a mutation tool with no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It doesn't address behavioral aspects like side effects, error conditions, or return values, leaving the agent with insufficient context for reliable invocation.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate for the undocumented parameter. It mentions 'memory' but doesn't explain what constitutes a valid memory, its format, length constraints, or how it's stored. The description adds minimal semantic value beyond the parameter name itself.

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 action ('Save') and target resource ('a memory to the vector store'), providing a specific verb+resource combination. However, it doesn't differentiate from its sibling 'search_memories' beyond the obvious action difference, so it doesn't fully distinguish from alternatives.

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 its sibling 'search_memories' or any other alternatives. It lacks context about prerequisites, appropriate scenarios, or exclusions, leaving the agent with minimal usage direction.

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/akaiserg/mcp-memory-tracker'

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