Skip to main content
Glama

merge_memories

Idempotent

Merge AI agent memories between sources in one atomic operation. Consolidate episodes and profiles with automatic deduplication and dry-run preview to eliminate intermediate export files.

Instructions

Merge memories, episodes, and profiles from one agent into another. Atomic one-shot equivalent of export→import without intermediate files. Strategy 'skip' deduplicates by msg_id (memories) and summary (episodes).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_agent_idYesAgent ID to merge FROM
target_agent_idYesAgent ID to merge INTO
strategyNoMerge strategy: 'skip' (default) — skip duplicates, keep target's versionskip
modeNoMerge mode: 'copy' (preserve source) or 'move' (delete source after merge)copy
dry_runNoPreview merge without writing to DB
Behavior4/5

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

Beyond annotations (idempotentHint: true, readOnlyHint: false), the description adds valuable behavioral details: it discloses atomicity ('one-shot'), explains deduplication logic for the 'skip' strategy (msg_id for memories, summary for episodes), and clarifies the file-less workflow. It does not mention idempotency explicitly, relying on annotations for that.

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?

Two dense sentences with zero waste. The first sentence front-loads the core action and unique value proposition (atomic, no intermediate files). The second sentence provides specific deduplication mechanics. Every word 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?

For a complex data migration operation with 5 parameters, the description covers the critical behavioral aspects (atomicity, deduplication, copy vs. move semantics). It appropriately delegates parameter specifics to the comprehensive schema. Minor gap: lacks mention of error conditions or agent existence prerequisites.

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?

With 100% schema coverage, the baseline is 3. The description elevates this by adding semantic depth for the 'strategy' parameter (explaining deduplication mechanics) and contextualizing 'mode' within the export/import equivalence. It adds meaningful value beyond the schema's technical definitions.

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 uses a specific verb ('Merge') with specific resources ('memories, episodes, and profiles') and explicitly distinguishes this tool from siblings by positioning it as an 'atomic one-shot equivalent of export→import without intermediate files,' clearly differentiating from export_memories and import_memories.

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 clear comparative context against the export→import workflow, helping agents choose this for atomic operations without file intermediates. However, it lacks explicit 'when not to use' guidance or prerequisites (e.g., whether both agents must exist beforehand).

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/Cloto-dev/CPersona'

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