Skip to main content
Glama

consolidate_memories

Combine similar memories into one, preserving unique info and merging tags. Preview or apply merges via cohesion-based auto-detection.

Instructions

Consolidate similar memories using algorithmic merging.

This tool intelligently merges similar memories by:

  1. Combining content (preserving unique information)

  2. Merging tags and entities (union)

  3. Calculating appropriate strength based on cohesion

  4. Preserving earliest created_at and latest last_used timestamps

Modes:

  • "preview": Generate merge preview without making changes

  • "apply": Execute the consolidation (requires cluster_id)

Args: cluster_id: Specific cluster ID to consolidate (valid UUID, required for apply mode). mode: Operation mode - "preview" or "apply". auto_detect: If True, automatically find high-cohesion clusters. cohesion_threshold: Minimum cohesion for auto-detection (0.0-1.0, default: 0.75).

Returns: Consolidation preview or execution results.

Raises: ValueError: If cluster_id is invalid or cohesion_threshold is out of range.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNopreview
cluster_idNo
auto_detectNo
cohesion_thresholdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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 behavioral disclosure. It details the merging algorithm (content, tags, strength, timestamps), the preview vs apply behavior, and error conditions. It does not explicitly state whether original memories are deleted or modified in place, but overall transparency is high.

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 well-organized with clear sections: numbered merge steps, a mode list, parameter explanations, and returns/raises. Every sentence serves a purpose, and the initial purpose statement is front-loaded, making the tool easy to scan and understand.

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 tool's complexity (multiple modes, optional auto-detection, threshold validation, and different outputs for preview vs apply), the description covers all necessary aspects. It even documents return behavior and errors despite having an output schema. No material gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/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. It does so comprehensively: every parameter (mode, cluster_id, auto_detect, cohesion_threshold) is explained with defaults, valid range, and mode-specific requirements. This fully compensates for the absent schema-level descriptions.

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 opens with 'Consolidate similar memories using algorithmic merging,' a specific verb+resource phrase that clearly states the tool's purpose. However, it does not explicitly distinguish this tool from its sibling 'cluster_memories,' so it falls short of full sibling differentiation.

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 explains operational modes ('preview' and 'apply') and auto-detection, giving clear invocation context. It does not, however, state when to use this tool over alternatives like 'cluster_memories' or mention exclusions, leaving the choice to the agent based on implied semantics.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/fastmcp-me/cortexgraph'

If you have feedback or need assistance with the MCP directory API, please join our Discord server