Skip to main content
Glama

retention_review

Destructive

Review stored memory candidates to list, preview or confirm deletion, or compact selected thoughts into a summary, so outdated entries can be cleaned up while important context is preserved.

Instructions

Review retention candidates: list candidates, preview or confirm deletion, or compact candidates into a summary. To keep a thought instead of deleting it, call memory_store action=update with is_protected=true (which also drops it out of the candidate list). Answers the shared envelope { items, meta } for list and { item, meta } for delete/compact; a preview sets meta.preview={token,destructive:true}.

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": {
      "action": "<action>"
    },
    "name": "retention_review"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum candidates to return. OPTIONAL for "list". REJECTED for all other actions.
actionYesAction
fieldsNoThought columns to include in each candidate; explicit fields win over compact. OPTIONAL for "list". REJECTED for all other actions.
offsetNoCandidate pagination offset. OPTIONAL for "list". REJECTED for all other actions.
compactNoCompact output (default true): trim each candidate to the minimal thought fields (id, content, status, tags as strings, project). compact=false returns the whole row. OPTIONAL for "list". REJECTED for all other actions.
confirmNoCONSUMED by "delete" and "compact" (true executes; false/omitted previews). REJECTED for "list".
summaryNoREQUIRED for "compact": the summary thought input. REJECTED for all other actions.
source_idsNoREQUIRED for "compact": source thought IDs to compress into one summary. REJECTED for all other actions.
thought_idNoThought ID. REQUIRED for "delete". REJECTED for "list" and "compact".
min_age_daysNoMinimum candidate age in days. OPTIONAL for "list". REJECTED for all other actions.
preview_tokenNoOPTIONAL preview token returned by a prior preview. CONSUMED by "delete" (true executes with token validation; missing/stale fails). REJECTED for "list" and "compact".
importance_floorNoMaximum importance threshold. OPTIONAL for "list". REJECTED for all other actions.

Output Schema

NameRequiredDescriptionDefault
resultYesAction payload (structuredContent.result); JSON mirror of content[].text, except the raw-text config action, whose result is { item: { text }, meta }

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.26.6
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "list",
      -  "protect",
      -  "delete",
      -  "compact"
      -]New value: +[
      +  "list",
      +  "delete",
      +  "compact"
      +]
    • changedInput schema / properties / confirm / description
      Previous value: -"CONSUMED by \"delete\" and \"compact\" (true executes; false/omitted previews). REJECTED for \"list\" and \"protect\"."New value: +"CONSUMED by \"delete\" and \"compact\" (true executes; false/omitted previews). REJECTED for \"list\"."
    • changedInput schema / properties / preview_token / description
      Previous value: -"OPTIONAL preview token returned by a prior preview. CONSUMED by \"delete\" (true executes with token validation; missing/stale fails). REJECTED for \"list\", \"protect\" and \"compact\"."New value: +"OPTIONAL preview token returned by a prior preview. CONSUMED by \"delete\" (true executes with token validation; missing/stale fails). REJECTED for \"list\" and \"compact\"."
    • changedInput schema / properties / thought_id / description
      Previous value: -"Thought ID. REQUIRED for \"protect\" and \"delete\". REJECTED for \"list\" and \"compact\"."New value: +"Thought ID. REQUIRED for \"delete\". REJECTED for \"list\" and \"compact\"."
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already declare destructiveHint=true and non-idempotence. The description adds valuable behavior beyond annotations: preview returns a token with destructive:true, confirm executes deletion/compaction, and protection via memory_store removes a thought from candidates. It stops short of explaining whether compaction removes source thoughts or whether deletion is permanently irreversible beyond the destructive annotation.

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?

The description is three sentences and front-loads the core operations. The final sentence about envelope shapes is useful but partly redundant because an output schema exists; overall it remains efficient and well structured.

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 12-parameter destructive tool with nested objects and an output schema, the description covers the critical action model, preview behavior, protection alternative, and response envelopes. It leaves detailed per-action parameter rules to the fully described schema, and does not explicitly spell out compaction side effects, but it is largely complete.

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 parameter meanings are already well documented in the schema. The description adds response envelope shapes and preview-token behavior, but does not add parameter-specific semantics beyond what the schema provides. This matches the baseline 3 for high schema coverage.

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 states a specific resource and set of operations: reviewing retention candidates, listing them, previewing/confirming deletion, and compacting candidates into a summary. It clearly separates the tool's actions and distinguishes it from a normal memory update by naming memory_store action=update for protection.

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

Usage Guidelines4/5

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

It explicitly gives the alternative action for keeping a thought: memory_store action=update with is_protected=true, and notes this removes it from the candidate list. It does not fully explain when to choose compact versus delete beyond naming the actions, but the usage context is clear.

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