Skip to main content
Glama

memory_delete

Destructive

Delete stored memories by tag, date range, or hash; preview bulk removals before executing to avoid accidental loss.

Instructions

Delete memories with flexible filtering. Combine filters for precise targeting.

USE THIS WHEN:

  • User says "delete", "remove", "forget" specific memories

  • Need to clean up by tag, time range, or specific hash

  • Bulk deletion with safety preview (dry_run=true)

FILTER COMBINATIONS (AND logic when multiple specified):

  • content_hash only: Delete single memory by hash

  • tags only: Delete memories with matching tags

  • before/after: Delete memories in time range

  • tags + time: Delete tagged memories within time range

SAFETY FEATURES:

  • dry_run=true: Preview what will be deleted without deleting

  • Returns deleted_hashes for audit trail

  • No filters = error (prevents accidental mass deletion)

Examples: {"content_hash": "abc123def456"} {"tags": ["temporary", "draft"], "tag_match": "any"} {"tags": ["archived", "old"], "tag_match": "all"} {"before": "2024-01-01"} {"after": "2024-06-01", "before": "2024-12-31"} {"tags": ["cleanup"], "before": "2024-01-01", "dry_run": true}

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": "memory_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
tagsNoFilter by these tags
afterNoDelete memories created after this date (ISO format: YYYY-MM-DD)
storeNoTarget store partition (default: 'default'). Use 'docs' for documents, 'all' for cross-store search.
beforeNoDelete memories created before this date (ISO format: YYYY-MM-DD)
dry_runNoPreview deletions without executing
tag_matchNoMatch ANY tag or ALL tagsany
content_hashNoSpecific memory hash to delete (ignores other filters if provided)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A4.4/5.0
Behavior5/5

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

Beyond destructiveHint=true, the description discloses the dry_run preview path, that deleted_hashes are returned for auditing, and that an empty filter set errors out to prevent accidental mass deletion. These are operational characteristics the annotation cannot express and they materially change how an agent should sequence calls (preview, then execute).

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?

Sectioned with headers (USE THIS WHEN, FILTER COMBINATIONS, SAFETY FEATURES, Examples), so the agent can scan to the needed part, and the safety note is prominent. It is somewhat long and the examples partially restate combinations already listed in prose.

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 7-parameter destructive tool with no output schema, the definition covers mutation semantics, safety preview, audit return, and the empty-filter guard well. It stops short of describing the 'store' partition behavior and cross-store scope, the only meaningful omission.

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, and the description earns above that by explaining that multiple filters combine with AND logic and by showing concrete tag_match 'any' vs 'all' payloads. It adds no guidance on the 'store' partition parameter, which is the one notable semantic gap.

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?

Opening line states a specific verb and resource ('Delete memories') plus the mechanism ('flexible filtering'), which is unambiguous. It does not explicitly distinguish itself from the sibling memory_cleanup or memory_update, so the agent must infer the boundary from the filter-combination details rather than from a direct contrast.

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 'USE THIS WHEN' triggers map user phrasing ('delete', 'remove', 'forget') to the tool, and the filter-combination list tells the agent precisely which argument shapes satisfy which intent. The note that no filters produces an error is a concrete when-not condition that steers the agent toward add filters or a different tool.

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