Skip to main content
Glama

get_memory

Retrieve a specific stored conversation memory by its unique ID to access previous interactions and context.

Instructions

Fetch a single memory once you know its memory_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memory_idYesExact memory_id to fetch.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'get_memory' tool. It resolves the API key and client, then calls the Mem0 client's 'get' method wrapped in error-handling via _mem0_call.
    @server.tool(description="Fetch a single memory once you know its memory_id.")
    def get_memory(
        memory_id: Annotated[str, Field(description="Exact memory_id to fetch.")],
        ctx: Context | None = None,
    ) -> str:
        """Retrieve a single memory once the user has picked an exact ID."""
    
        api_key, _, _ = _resolve_settings(ctx)
        client = _mem0_client(api_key)
        return _mem0_call(client.get, memory_id)
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. It states 'Fetch a single memory', which implies a read-only operation, but doesn't disclose behavioral traits such as error handling (e.g., what happens if memory_id is invalid), authentication needs, rate limits, or response format. This leaves significant gaps for a tool with no annotation coverage.

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 a single, efficient sentence with zero waste. It front-loads the key information ('Fetch a single memory') and adds a concise usage note ('once you know its memory_id'), making it appropriately sized and well-structured.

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

Completeness4/5

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

Given the tool's simplicity (1 parameter, 100% schema coverage, and an output schema exists), the description is mostly complete. It clarifies the tool's purpose and basic usage. However, without annotations, it could benefit from more behavioral context, but the output schema reduces the need to explain return values, keeping it adequate.

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 schema description coverage is 100%, with the parameter 'memory_id' well-documented as 'Exact memory_id to fetch'. The description adds minimal value beyond this, only reinforcing that the memory_id must be known. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 ('Fetch') and resource ('a single memory'), distinguishing it from sibling tools like 'get_memories' (plural) and 'search_memories'. However, it doesn't explicitly differentiate from 'list_entities' or 'delete_memory', which could also involve memory operations, leaving some ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by stating 'once you know its memory_id', suggesting it's for retrieving specific memories rather than listing or searching. However, it lacks explicit guidance on when to use this versus alternatives like 'get_memories' or 'search_memories', and doesn't mention prerequisites or exclusions.

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/parthshr370/mem0_mcp_private'

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