Skip to main content
Glama

consolidate_memories

Merge similar memories automatically to reduce redundancy and preserve unique information, with preview and apply modes for safe consolidation.

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

Behavior5/5

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

With no annotations provided, the description fully carries the transparency burden. It discloses the merging algorithm's behavior: preserving unique content, unioning tags, calculating strength, and preserving earliest/latest timestamps. It clearly states that preview makes no changes while apply executes, and it documents error conditions (ValueError) for invalid inputs, offering complete behavioral disclosure.

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 a clear introductory sentence, numbered behavioral steps, a mode breakdown, an args list, and returns/raises sections. Every sentence contributes meaning, and the structure makes it easy to scan. It is appropriately detailed for a tool with four parameters and multiple modes.

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 (two modes, auto-detection, thresholds, multiple merge behaviors), the description covers all essential aspects: what it does, how to invoke each mode, parameter details, expected returns, and error handling. The output schema existence is acknowledged, and the description's return summary complements it. No gaps are evident.

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?

The schema provides zero parameter descriptions (0% coverage), but the description compensates with detailed semantics: cluster_id is a valid UUID required for apply mode, mode is 'preview' or 'apply', auto_detect triggers high-cohesion detection, and cohesion_threshold has a 0.0-1.0 range with default 0.75. This fully explains what each parameter means and how it influences behavior.

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 opens with 'Consolidate similar memories using algorithmic merging,' a specific verb-object pair that clearly captures the tool's function. It distinguishes itself from sibling tools like cluster_memories by focusing on merging and consolidation rather than grouping or detection. The description also enumerates the concrete actions performed (combining content, merging tags, etc.), reinforcing purpose.

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 description provides explicit usage context for modes: 'preview' generates a merge preview without changes, while 'apply' requires a cluster_id. It explains auto_detect and cohesion_threshold for automatic cluster selection, giving clear scenario-based guidance. However, it does not explicitly compare to sibling tools like cluster_memories or state when not to use this tool, leaving some room for ambiguity.

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/mnemex'

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