Skip to main content
Glama

cleanup_memory

Remove old memory entries by age or total count to keep stored project context within configured retention limits.

Instructions

Clean up old memory entries based on retention policy.

Args: max_age_days: Maximum age in days (default 90). max_entries: Maximum number of entries to keep (default 10000).

Returns: JSON: {"ok": true, "cleanup": {...}}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_entriesNo
max_age_daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full disclosure burden for what is clearly a destructive bulk operation. It states nothing about whether deletion is reversible, whether entries across agents/workspaces are affected, what permissions are required, or whether the operation is scoped to the caller's memory. Only the parameter defaults and a return shape are given.

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?

Purpose is front-loaded in the first sentence, followed by compact Args and Returns blocks. The structure is slightly boilerplate but nothing is wasted and no sentence is filler.

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?

The presence of an output schema means the Returns block is partly redundant. However, for a destructive multi-parameter tool backed by zero annotations, the description does not address irreversibility, scope of effect, or interaction between the two limits, leaving it only marginally complete.

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 0%, so the description must compensate, and it largely does: it explains both parameters' meaning and defaults ('max_age_days: Maximum age in days (default 90)', 'max_entries: Maximum number of entries to keep (default 10000)'). It does not explain their interaction (OR vs AND, precedence when both are set), which is a residual 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 ('clean up') and resource ('old memory entries') with the governing rule ('based on retention policy'). It reads as a bulk retention-pruning operation, distinguishable from delete_memory and save_memory, though it never names or contrasts those siblings explicitly.

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, no mention of prerequisites, and no reference to alternatives like delete_memory for targeted removal. The phrase 'based on retention policy' implies periodic bulk maintenance but leaves the agent to infer the trigger conditions.

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