Skip to main content
Glama

memory_prune

Delete memories from a specified actor's store using configurable strategies such as age, importance, count, or type. Returns the IDs and count of removed memories.

Instructions

Prune (delete) memories matching the given strategy. Scoped to a single actor — defaults to the current session actor. Returns the pruned memory IDs and count. Handle with care.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesPrune strategy type. Note: 'custom' is not available via MCP because it requires a JS function.
maxAgeNoMax age in seconds (for byAge). Memories older than this are removed.
actorIdNoActor ID to scope pruning to. Defaults to the current session actor.
maxPerActorNoMaximum memories per actor (for byCount). Excess memories are removed.
memoryTypesNoMemory types to prune (for byType).
minImportanceNoMinimum importance (for byImportance). Memories below this are removed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosing side effects. It explicitly states that memories are deleted, scoping is per actor, and the return includes IDs and count. It also cautions with 'Handle with care,' signaling destructiveness. However, it does not mention irreversibility, permissions, or potential cascading effects, so a perfect score is not warranted.

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?

The description is two sentences, tightly packed with necessary information. It front-loads the primary action, then details scope and return value. No redundant or filler content exists, making it highly efficient.

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?

Given the absence of an output schema, the description adequately explains the return value (pruned memory IDs and count). It also clarifies scoping and default behavior. Together with the schema, this provides sufficient context for an agent to invoke the tool correctly without ambiguity.

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?

The schema descriptions already cover all parameters at 100% coverage, establishing a baseline of 3. The tool description adds no further clarification about parameter interactions (e.g., how strategy types map to fields) beyond what the schema already provides, so the baseline holds.

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 clearly states the tool's function: pruning (deleting) memories based on a strategy. It names the resource (memories), the action (prune/delete), and the scope (single actor, defaulting to session). It also distinguishes itself from sibling tools like memory_purge_actor (which purges all for an actor) and memory_delete (specific deletion) by focusing on strategy-based pruning.

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 implies when to use this tool (for strategy-based pruning) but does not explicitly contrast it with alternatives. It lacks guidance on when to prefer memory_delete for individual items or memory_purge_actor for clearing an actor entirely, leaving the selection to inference rather than explicit direction.

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