Skip to main content
Glama

memory_gc_tool

Purge terminal-state memories older than a retention window. Eligible items are superseded, invalidated, or resolved, untouched for the retention period and unreferenced; defaults to dry-run.

Instructions

Purge terminal-state memories older than a retention window.

Only superseded/invalidated/resolved items untouched for retention_days and not referenced by any relation are eligible. Defaults to dry-run.

Args: retention_days: Age threshold in days (default 90) dry_run: Report candidates without deleting (default True) project: Optional project root path. Auto-detected from git root if omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actorNo
dry_runNo
projectNo
retention_daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations, the description carries the full load and does well: it names exactly which items are destroyed, discloses the relation-reference guard, and front-loads the dry-run default as a safety mechanism. Gaps remain around irreversibility and the undocumented actor parameter, which hints at an audit/attribution behavior that is never explained.

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?

Front-loaded and well organized: purpose, eligibility, safety default, then an Args block. The Args entries restate schema defaults, which is mild redundancy, but with zero schema descriptions the block still adds value rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists so return values need not be described. For a destructive operation with no annotations and 0% schema coverage, the description is adequate on eligibility and dry-run but silent on actor semantics, permissions, and reversibility, leaving the agent short of what it needs to invoke this confidently.

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 0%, so the description must compensate, and it documents 3 of 4 parameters with meaning beyond the schema defaults (age threshold, report-only mode, git-root auto-detection). The actor parameter is left entirely unexplained in both schema and description, leaving a real 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?

States a specific verb (purge) and resource (terminal-state memories) plus the exact eligibility predicate: superseded/invalidated/resolved items untouched for retention_days and not referenced by any relation. That precision effectively separates it from memory_delete_tool, but no sibling is named explicitly, so it stops short of a 5.

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

Usage Guidelines3/5

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

The description conveys implicit usage context via 'Defaults to dry-run' and the eligibility rules, which tells the agent this is a cautious, criteria-driven cleanup rather than arbitrary deletion. However it never states when to prefer this over memory_delete_tool or memory_update_tool, nor any when-not condition.

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