Delete Memory
delete_memoryDelete a single memory by ID or bulk-remove all memories sharing any given tags. Use to purge incorrect, duplicate, or test data, verifying tags first since bulk deletion has no dry-run.
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
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "delete_memory"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Bulk mode (XOR with `memory_id`): deletes ALL memories with ANY of these tags. Exact, case-insensitive. No dry-run. | |
| memory_id | No | Single mode (XOR with `tags`). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tags | No | Bulk mode. | |
| message | Yes | ||
| memory_id | No | Single mode. | |
| deleted_count | No | Bulk mode. |