Skip to main content
Glama
arunkumars-mf

mem0-agent-memory

bulk_delete_memories

Delete stored memories in bulk using filters like metadata type or age. Preview deletions first, then permanently erase with dry run disabled.

Instructions

Delete multiple memories matching filter criteria. PERMANENT deletion.

OPTIONAL: 'user_id' OR 'agent_id' (if neither provided, auto-detects current user) OPTIONAL: 'run_id' - filter by session/run identifier OPTIONAL: 'metadata_type' - delete memories with this metadata type (e.g., "test", "note") OPTIONAL: 'older_than_days' - delete memories older than this many days OPTIONAL: 'dry_run' - if True, returns what would be deleted without actually deleting (default: True)

⚠️ WARNING: Set dry_run=False to actually delete. This cannot be undone.

Examples:

  • Preview test cleanup: {"metadata_type": "test", "dry_run": true}

  • Delete old memories: {"older_than_days": 90, "dry_run": false}

  • Delete by type: {"metadata_type": "note", "dry_run": false}

Returns: List of deleted (or would-be-deleted) memory IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
run_idNo
dry_runNo
user_idNo
verboseNo
agent_idNo
metadata_typeNo
older_than_daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.3.2

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully carries the behavioral disclosure burden. It clearly warns that deletion is permanent and cannot be undone, explains that dry_run defaults to True and must be set to False to actually delete, and describes the return value as a list of deleted or would-be-deleted IDs. This is exemplary transparency for a destructive tool.

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 front-loaded with the purpose and permanence warning, followed by a concise bullet-style list of optional parameters, clear examples, and a return-value note. The redundancy of the permanence warning reinforces safety rather than cluttering the message. Every section earns its place.

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?

For a destructive bulk operation with no annotations and a 0% schema-description coverage, the description is largely complete: it covers filters, dry-run behavior, irreversibility, examples, and return values. The main gaps are the undocumented 'verbose' parameter and the lack of explicit routing guidance against sibling tools like delete_all_memories.

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

Parameters4/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 explain parameters. It does explain user_id, agent_id, run_id, metadata_type, older_than_days, and dry_run with helpful examples. However, the 'verbose' parameter in the schema is not mentioned at all, leaving one parameter unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description states a specific verb and resource: 'Delete multiple memories matching filter criteria.' It also highlights 'PERMANENT deletion,' which distinguishes it from read-only or reversible operations. The plural scope and filter-based behavior differentiate it clearly from singular delete_memory and define its role relative to bulk operations.

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

Usage Guidelines4/5

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

The description provides clear usage context via optional filter criteria, dry-run preview, and practical examples such as previewing test cleanup and deleting old memories. However, it does not explicitly state when to prefer this tool over delete_memory or delete_all_memories, leaving some sibling differentiation to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/arunkumars-mf/mem0-agent-memory'

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