Skip to main content
Glama

memory_consolidate

Run, monitor, and control memory consolidation: check system health, trigger or schedule optimization jobs, pause and resume them, or merge multiple memories into one entry.

Instructions

Memory consolidation management - run, monitor, and control memory optimization.

USE THIS WHEN:

  • User asks about memory optimization, cleanup, or consolidation

  • Need to check consolidation system health

  • Want to manually trigger or schedule consolidation

  • Need to pause/resume consolidation jobs

ACTIONS:

  • run: Execute consolidation for a time horizon (requires time_horizon) Performs dream-inspired memory consolidation: • Exponential decay scoring • Creative association discovery • Semantic clustering and compression • Controlled forgetting with archival

  • status: Get consolidation system health and statistics

  • recommend: Get optimization recommendations for a time horizon (requires time_horizon) Analyzes memory state and suggests whether consolidation is needed

  • scheduler: View all scheduled consolidation jobs Shows next run times and execution statistics

  • pause: Pause consolidation (all or specific horizon) Temporarily stops automatic consolidation jobs

  • resume: Resume paused consolidation Re-enables previously paused consolidation jobs

  • merge: Combine multiple existing memories into one consolidated entry (requires content_hashes and merged_content) Verifies all source memories exist, stores the merged content, deletes originals

TIME HORIZONS:

  • daily: Consolidate last 24 hours

  • weekly: Consolidate last 7 days

  • monthly: Consolidate last 30 days

  • quarterly: Consolidate last 90 days

  • yearly: Consolidate last 365 days

Examples: {"action": "status"} {"action": "run", "time_horizon": "weekly"} {"action": "run", "time_horizon": "daily", "immediate": true} {"action": "recommend", "time_horizon": "monthly"} {"action": "scheduler"} {"action": "pause"} {"action": "pause", "time_horizon": "daily"} {"action": "resume", "time_horizon": "weekly"} {"action": "merge", "content_hashes": ["hash1", "hash2"], "merged_content": "Consolidated text"} {"action": "merge", "content_hashes": ["hash1", "hash2"], "merged_content": "text", "tags": ["important"], "memory_type": "note"}

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

Input Schema

NameRequiredDescriptionDefault
tagsNoTags for the merged memory (default: union of source tags)
actionYesConsolidation action to perform
immediateNoFor 'run' action: execute immediately vs schedule for later
memory_typeNoMemory type for the merged memory (default: inherited from first source)
time_horizonNoTime horizon (required for run/recommend, optional for pause/resume)
content_hashesNoContent hashes of the memories to merge (minimum 2)
merged_contentNoThe consolidated content that replaces the source memories

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

B3.4/5.0
Behavior1/5

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

The description says the merge action 'deletes originals,' which is a destructive update to stored memories, while the annotations declare destructiveHint=false. This directly contradicts the supplied annotation despite other useful action-level behavior being disclosed.

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 well organized and front-loaded with purpose and usage guidance, then broken into actions, horizons, and examples. It is somewhat long and repetitive because action requirements appear in both prose and examples, but the length is mostly justified by the seven-action interface.

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 complex multi-action tool, the description covers the actions, required parameters, time-horizon meanings, and invocation examples well enough to call it correctly. It lacks return-value descriptions and explicit routing guidance for overlapping sibling tools, and there is no output schema to compensate.

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 description coverage is already 100%, so the baseline is 3, but the description adds meaningful semantics by mapping time horizons to durations and by stating which parameters each action requires. It does not add much beyond the schema for parameters such as immediate or merged-content defaults.

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?

The description clearly states that this is memory consolidation management for running, monitoring, and controlling optimization, and the action list makes the scope concrete. It does not explicitly contrast itself with nearby siblings such as memory_health, memory_stats, or memory_cleanup, so sibling differentiation is only implicit.

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?

The 'USE THIS WHEN' section gives clear usage scenarios, and the action descriptions plus examples indicate how to invoke each mode. It does not say when not to use this tool or name alternative tools for overlapping tasks such as health checks or cleanup.

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