Skip to main content
Glama

memory_merge

Combine duplicate or fragmented memories into one entry. Creates a merged memory and invalidates both originals to remove overlap.

Instructions

Merge two related memories into one. Creates a new merged memory and invalidates both originals. Use when duplicate or fragmented memories cover the same topic.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scopeNoScope filter (optional)
primaryIdYesID of the primary memory (text used as base if mergedText is not provided)
importanceNoOverride importance (default: max of both)
mergedTextNoExplicit merged text. If omitted, both texts are concatenated.
secondaryIdYesID of the secondary memory to absorb

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.33

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does disclose the critical side effect: a new memory is created and both originals are invalidated, which is the key consequence an agent must know before calling. It omits reversibility (can a merge be undone via memory_history?), permission requirements, and error behavior for nonexistent IDs.

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?

Three short, front-loaded sentences with zero padding: purpose, side effect, then usage trigger. Every sentence earns its place.

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?

All five parameters are documented and the core mutation semantics are explained. Since there is no output schema, the description could say what the caller receives (e.g., the new memory's ID) or how missing IDs are handled, but it is otherwise sufficient for correct invocation.

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?

Schema description coverage is 100%, so every parameter including the primary/secondary roles, importance default, and mergedText fallback is already documented in the schema. The description adds no parameter-level detail beyond that baseline, so a 3 is appropriate.

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?

States a specific verb (merge) and resource (two memories), and distinguishes itself from siblings like memory_store and memory_update by describing the compound effect: a new merged memory is created and both originals are invalidated. An agent can tell exactly what this does without opening the schema.

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?

Explicitly names the triggering condition: 'Use when duplicate or fragmented memories cover the same topic.' That is a clear when-to-use statement, but it does not name alternatives (e.g., memory_update for single-record edits) or state when not to merge.

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