Skip to main content
Glama

Delete Memory

delete_memory
Destructive

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

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: "8f3a2c1e-5b7d-4e9a-a1c3-2d4f6b8e0a91" }) // Mode 1

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

Input Schema

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

Output Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.14.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description goes well beyond them: Mode 2 deletes ALL memories matching ANY tag, matching is exact/case-insensitive, there is no dry-run, a single call can remove thousands, and the embedding goes with the memory. The only wrinkle is 'Mode 1 ... Idempotent' versus idempotentHint=false — it is reconciled by the explicit 'Mode 2 NOT idempotent in practice' sentence, so it is a scope nuance rather than a contradiction, though it demands careful reading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the two-mode summary and scoped with bold headers, so an agent can stop reading after the first line if it already knows the mode. It runs long and repeats schema text (exact/case-insensitive matching, no dry-run appear twice), which is the only thing keeping it below a 5.

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?

Both parameters, their XOR relationship, defaults, and the destructive bulk hazard are covered, and an output schema exists so return values need not be described. For a two-parameter destructive tool, nothing an agent needs to call it safely is missing.

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 coverage is 100%, so the baseline is 3; the description earns above that by supplying a default ('Single (default)'), clarifying XOR selection between `memory_id` and `tags`, spelling out any-of/case-insensitive tag matching, and giving concrete call examples. It largely echoes the schema's own parameter descriptions rather than adding new syntax, which caps it at 4.

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?

States a specific verb+resource (delete a memory) and breaks it into two clearly labeled modes with the parameter that selects each. It also positions itself against the sibling `update_memory` as the preferred alternative, so an agent can distinguish it from `store_memory`/`recall_memory`/`update_memory` without opening any schema.

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?

Explicit 'When to use' bullets map each mode to concrete situations (incorrect info, duplicates, benchmark cleanup, deprecated tag namespaces), and it names alternatives: 'consider `update_memory` instead' and 'Verify with `recall_memory({ tags, exhaustive: true })` first'. When-not guidance ('use sparingly', 'no dry-run') is unambiguous.

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