Skip to main content
Glama

link_memories

Link two memories in the same store as contradicting or duplicate to flag conflicting claims or repeated records, so context retrieval shows which memory conflicts.

Instructions

Flag two memories as contradicts (mutually conflicting claims) or duplicate_of (same claim, recorded twice). Both ids must live in the same store (repo or global) -- memory_link is a same-store reference, so a repo/global pair is refused. Once linked, retrieve_context surfaces each contradicting item's contradicted_by field so a caller sees which other memory it conflicts with, not just an aggregate count. Use change_status with supersedes_link_to instead when one memory fully replaces another (that is a status transition, not a same-status link).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "from_id": "<from_id>",
      "to_id": "<to_id>",
      "link_type": "<link_type>"
    },
    "name": "link_memories"
  }
}

Input Schema

NameRequiredDescriptionDefault
scopeNo
to_idYes
from_idYes
link_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the load and does so well: it discloses the same-store constraint and explicit refusal case, plus the downstream effect that `retrieve_context` will surface each item's `contradicted_by` field. It stops short of covering removal/undo of an existing link, behavior on nonexistent ids, or the error shape when a link is refused, so it is strong but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and the allowed link types, then the constraints, then the alternative. Dense and largely waste-free, though the mid-sentence line breaks make it slightly harder to scan than a single tight paragraph would be.

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 four-parameter mutation tool with no annotations and no output schema, the description covers the key behaviors: allowed link types, store constraint, refusal case, and the observable effect on `retrieve_context`. The unexplained `scope` parameter and unaddressed unlink path are the remaining gaps.

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 coverage is 0% and `link_type` is an unconstrained string in the schema, so the description's enumeration of `contradicts` and `duplicate_of` adds real value, and 'both ids must live in the same store' constrains from_id/to_id. However, the `scope` parameter (default null, string/null anyOf) is never mentioned, and the directionality of from_id vs to_id relative to `contradicted_by` is only implied.

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?

Opens with a specific verb and resource ('Flag two memories') and immediately enumerates the two link types it creates, `contradicts` and `duplicate_of`, with a parenthetical gloss for each. An agent can distinguish it from change_status and record_memory 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 Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit exclusion with the alternative named: use `change_status` with `supersedes_link_to` when one memory fully replaces another, and explains why (status transition, not a same-status link). It also states the same-store precondition and that a repo/global pair is refused.

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