Skip to main content
Glama

distill_memories

DestructiveIdempotent

Audit scope memory health, suggest duplicate consolidations, or prune expired and stale records; dry-run mode prevents accidental deletion.

Instructions

Audit scope memory health, suggest duplicate slot consolidations, or prune expired episodic and abandoned stale records. action='audit' (default) and action='suggest' are read-only diagnostics; action='prune' archives expired episodic notes and stale memories older than stale_age_days, but is gated by dry_run=True by default (set dry_run=False to commit changes and sync Markdown exports). Use distill_memories for periodic scope-wide hygiene; use deprecate_memory to retire a single obsolete memory ID, or save_memory with replaces_id to apply consolidation suggestions.

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

Input Schema

NameRequiredDescriptionDefault
scopeNoTarget scope to audit or distill. Use 'all' or specific scope name like 'homelab' or 'helios'.global
actionNoAction to perform: 'audit' (read-only health scan), 'prune' (archive expired/stale memories), or 'suggest' (recommend deduplication consolidations).audit
dry_runNoSafety gate for action='prune'. Set to False to apply archival to SQLite.
stale_age_daysNoMinimum age in days for stale memories to be considered for pruning.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.3

TDQS

A4.6/5.0
Behavior4/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, which would make a cautious agent wary of every call; the description usefully narrows that to action='prune' and notes audit/suggest are read-only diagnostics, plus the dry_run=True default and the Markdown export sync side effect on commit. It does not say whether archived records can be restored/undeleted or how long a prune run takes, which are the remaining behavioral gaps.

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?

Three sentences, front-loaded with the capability summary before the safety/routing details, and every sentence carries information. The opening sentence is a dense three-clause run-on that takes a second read to parse into the action values.

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?

With an output schema present, return values need no explanation; all four optional parameters are documented in the schema and reinforced in prose, and the destructive-action scoping plus the sibling routing cover the decision points an agent faces. Nothing needed to call it correctly 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, but the description adds meaning beyond the schema: it links dry_run=False to committing changes and syncing Markdown exports, and ties stale_age_days to the prune threshold ('stale memories older than stale_age_days'). The scope parameter's accepted values are only covered by the schema, not the description.

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 first sentence names three specific capabilities tied to one resource (scope memory health audit, duplicate consolidation suggestions, pruning of expired/stale records), and the description maps each to an explicit action value. An agent can distinguish this from deprecate_memory and save_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?

It states the use case ('periodic scope-wide hygiene') and then names the alternatives with their selecting conditions: deprecate_memory for a single obsolete ID, save_memory with replaces_id to apply consolidations. This is explicit when-to-use and when-not-to-use routing.

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