Skip to main content
Glama

Delete Memory

delete_memory
Destructive

Delete a single memory by its ID or bulk-remove all memories matching specified tags. Use for correcting errors, removing duplicates, or cleaning up test data.

Instructions

Delete a memory by ID (memory_id) or bulk-delete by tag (tags). Use sparingly — consider update_memory instead.

Mode 1 — Single (default): pass memory_id to delete one memory and its embedding. Idempotent: re-running on the same ID is a no-op.

Mode 2 — Bulk-by-tag: pass tags: [...] to delete ALL memories tagged with ANY of these tags. Tag matching is exact (case-insensitive), any-of mode. There is NO dry-run. This can delete thousands of memories in one call. NOT idempotent in practice — re-running may catch new memories that were tagged the same way after the first call. Verify with recall_memory({ tags, exhaustive: true }) first if uncertain.

When to use:

  • Memory contains incorrect information that can't be corrected (Mode 1)

  • Memory is a duplicate (Mode 1)

  • Cleanup of benchmark/test data scoped by tag (Mode 2)

  • Removing all memories under a deprecated tag namespace (Mode 2)

Examples:

  • delete_memory({ memory_id: "abc123" }) // Mode 1

  • delete_memory({ tags: ["benchmark-test"] }) // Mode 2, bulk by tag

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memory_idNoSingle-delete mode (XOR with `tags`). ID of the memory to delete (from store_memory or recall results).
tagsNoBulk-delete mode (XOR with `memory_id`). Bulk-deletes ALL memories tagged with ANY of these tags. Exact match, case-insensitive. No dry-run.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
memory_idNoSingle-delete result: ID of the deleted memory.
deleted_countNoBulk-delete result: number of memories deleted.
tagsNoBulk-delete result: tags that were used for the bulk delete.
messageYesConfirmation message
Behavior5/5

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

Disclosures beyond annotations: idempotent for single mode, not idempotent for bulk, exact case-insensitive tag matching, no dry-run, potential for mass deletion. No contradiction with annotations indicating destructive and non-idempotent 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?

Well-structured with headings, bullet points, and examples. Information is presented efficiently and front-loaded with core action, making it easy to parse.

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

Completeness5/5

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

With output schema present and parameters fully described, the description covers all essential aspects: modes, usage context, safety warnings, and verification steps. No important gaps remain.

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

Parameters5/5

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

Schema coverage is 100%, but description adds XOR relationship, mode differentiation, exact tag matching details, and no-dry-run warning. This significantly enhances understanding beyond schema descriptions.

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?

The description clearly states the tool deletes memories by ID or bulk by tag, specifying two modes with distinct behaviors. It differentiates from sibling tools like update_memory, providing a precise action and resource.

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

Usage Guidelines5/5

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

Explicitly advises to use sparingly and consider update_memory instead, and provides specific scenarios for each mode, including verification steps for bulk deletion. This gives clear when-to-use and when-not-to-use guidance.

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/verygoodplugins/mcp-automem'

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