Skip to main content
Glama

Delete Memories by Context

delete_by_context
DestructiveIdempotent

Delete all stored memories matching a specific metadata key-value pair, optionally scoped to a namespace, to remove context-specific data.

Instructions

Delete all memories matching a specific context metadata [key, value] pair.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "key": "<key>",
      "value": "<value>"
    },
    "name": "delete_by_context"
  }
}

Input Schema

NameRequiredDescriptionDefault
keyYesMetadata key to match.
valueYesMetadata value to match.
namespaceNoOptional namespace scope.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=true, so the safety profile is carried by structured data. The description contributes one genuinely useful behavioral fact beyond that: the deletion is bulk-scoped ("all memories matching") rather than a single record. It omits irreversibility, any confirmation/count of what was removed, and whether deleted memories can be recovered, which matters for a destructive bulk operation.

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?

One sentence, front-loaded with the verb and the scope before the filter criterion; there is no redundant or filler wording. Nothing needs to be trimmed.

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 three-parameter, no-output-schema tool with full schema coverage and explicit destructive/idempotent annotations, the definition covers the essentials of what gets removed. It is slightly thin on consequences (no statement of irreversibility or of what the call returns after a bulk delete), but the structured fields compensate for most of that.

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

Parameters3/5

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

Schema description coverage is 100%, so both required parameters (key, value) and the optional namespace are already documented in the schema; the baseline is therefore 3. The description's phrasing "matching a specific context metadata [key, value] pair" only restates the schema and adds no detail on matching semantics (exact vs. partial, case sensitivity) or on how namespace narrows the deletion.

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?

The description gives a specific verb ("Delete") plus the resource ("all memories") and the exact selection criterion (a context metadata [key, value] pair), so an agent can tell what the tool operates on without opening the schema. It stops short of differentiating itself from a sibling like forget_memory, which is a similar removal operation, so it is clear but not fully disambiguated.

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

Usage Guidelines2/5

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

There is no when-to-use guidance: nothing states that this is the bulk/context-scoped removal path versus a targeted single-memory removal such as forget_memory, and no prerequisites or exclusions are mentioned. The only usage signal is the implicit "matching a pair" filter, which the agent must infer.

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