Skip to main content
Glama
arjunkmrm

Mem0 MCP Server

delete_memory

Remove specific stored memories from the Mem0 MCP Server by providing the exact memory ID, enabling users to manage their persistent data and maintain privacy across sessions.

Instructions

Delete one memory after the user confirms its memory_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memory_idYesExact memory_id to delete.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The delete_memory tool handler, including registration decorator and implementation logic that calls the Mem0 client's delete method.
    @server.tool(description="Delete one memory after the user confirms its memory_id.")
    def delete_memory(
        memory_id: Annotated[str, Field(description="Exact memory_id to delete.")],
        ctx: Context | None = None,
    ) -> str:
        """Delete a memory once the user explicitly confirms the memory_id to remove."""
    
        api_key, _, _ = _resolve_settings(ctx)
        client = _mem0_client(api_key)
        return _mem0_call(client.delete, memory_id)
  • Registration of the delete_memory tool using @server.tool decorator on FastMCP instance.
    @server.tool(description="Delete one memory after the user confirms its 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 mentions the deletion action and a confirmation step, but does not disclose critical behavioral traits such as whether the deletion is permanent, what permissions are required, error handling, or what the output schema returns. For a destructive tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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, clear sentence that efficiently conveys the core action and condition without unnecessary words. It is front-loaded with the key information ('Delete one memory') and structured appropriately for quick understanding.

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

Completeness3/5

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

Given the tool's complexity (destructive operation with one parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and incomplete behavioral disclosure, it fails to fully address the tool's context, such as safety considerations or integration with sibling tools. It meets basic needs but has clear gaps.

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?

Schema description coverage is 100%, with the parameter 'memory_id' well-documented in the schema as 'Exact memory_id to delete.' The description adds minimal value by reiterating the need for 'memory_id' but does not provide additional context like format examples or validation rules. Baseline 3 is appropriate since the schema does the heavy lifting.

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 ('Delete') and resource ('one memory'), making the purpose understandable. It specifies 'one memory' which distinguishes it from 'delete_all_memories', though it doesn't explicitly contrast with other siblings like 'delete_entities' or 'update_memory'. The description is specific but could be more precise about differentiation.

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 'after the user confirms its memory_id', suggesting this tool should be used when the user has identified a specific memory to delete. However, it does not provide explicit guidance on when to use this versus alternatives like 'delete_all_memories' or 'delete_entities', nor does it mention prerequisites or exclusions. The guidance is implied but incomplete.

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/arjunkmrm/mem0-mcp'

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