Skip to main content
Glama

consolidate_memories

Merge or link similar memories to reduce redundancy and strengthen recall. Preview changes before applying, or auto-detect clusters using a cohesion threshold.

Instructions

Merge or link similar memories algorithmically.

Args: cluster_id: Cluster UUID to act on (required unless auto_detect=True). mode: "preview" (no changes), "apply" (merge), or "link" (relations only). auto_detect: Find high-cohesion clusters automatically. cohesion_threshold: Minimum cohesion (0.0-1.0).

Returns: Dict with success, mode, consolidated clusters, and results.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNopreview
cluster_idNo
auto_detectNo
cohesion_thresholdNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.1

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses that 'preview' makes no changes, that 'apply' merges, and that 'link' creates relations only, plus the ValueError conditions. However, it does not state whether 'apply' is destructive or irreversible, or what happens to the original memory records after consolidation.

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 into Args, Returns, and Raises sections. Every sentence adds practical information: purpose, parameter semantics, output shape, and error conditions. It is compact without sacrificing needed detail.

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?

The description covers all parameters, return values, and exceptions, giving an agent enough to call the tool correctly in most cases. The main gaps are the lack of explicit guidance on edge cases like supplying both cluster_id and auto_detect, and no mention of side effects on existing memories during 'apply'.

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 fully compensates. It explains all four parameters, including valid mode values, the threshold range, and the conditional requirement for cluster_id depending on auto_detect. This goes well beyond the bare schema titles.

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 a specific verb and resource: 'Merge or link similar memories algorithmically.' It clearly communicates the tool's function, but it does not explicitly differentiate it from sibling tools like cluster_memories or create_relation, which could overlap in purpose.

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 usage through mode options ('preview', 'apply', 'link') and the note that cluster_id is required unless auto_detect=True, but it gives no explicit guidance on when to prefer this tool over alternatives such as cluster_memories or promote_memory. There are no when-not-to-use conditions or named alternatives.

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