Skip to main content
Glama

delete_memory

Remove specific stored conversation memories by confirming their memory_id to manage memory data in the Mem0 MCP Server.

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: registered with @server.tool decorator and implements deletion logic by resolving API settings, getting Mem0 client, and calling client.delete with the provided memory_id.
    @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 the FastMCP server's tool decorator.
    @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 full burden. It mentions user confirmation requirement, which is valuable behavioral context. However, it lacks details on permissions needed, whether deletion is reversible, rate limits, or what happens upon success/failure. For a destructive operation with zero annotation coverage, this is insufficient.

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 key constraint (user confirmation). It's front-loaded with the main purpose and wastes no words.

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 has an output schema (not provided in details), the description doesn't need to explain return values. However, as a destructive operation with no annotations, it should provide more behavioral context about permissions, reversibility, or error handling. The description is adequate but has clear gaps for a deletion tool.

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 documented as 'Exact memory_id to delete.' The description adds minimal value by restating this parameter in context, but doesn't provide additional syntax, format examples, or constraints beyond what the schema already covers.

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'), specifying it operates on a single memory identified by memory_id. It distinguishes from siblings like delete_all_memories by focusing on single deletion, but doesn't explicitly contrast with other deletion tools like delete_entities.

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 when a user wants to delete a specific memory after confirmation, but doesn't provide explicit guidance on when to use this versus alternatives like delete_all_memories or delete_entities. No prerequisites or exclusions are mentioned.

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