Skip to main content
Glama

Link memories

memory_relate

Create or remove directed links between memories (supports, contradicts, supersedes, refines, duplicates, related) to map relationships; backlinks become visible when retrieving a memory.

Instructions

Create or remove directed links between memories (the relationship graph): e.g. tie a decision to the facts it depends on, or a history entry to the decision it records. Targets must exist; backlinks are visible via memory_get.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesSource memory id
kindNoEdge kind (plan §4.7): supports | contradicts | supersedes | refines | duplicates | relatedrelated
actionNoadd (default) creates links, remove deletes themadd
relatedYesTarget memory ids to link to / unlink from

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.8.0

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full disclosure burden. It does add useful behavioral context: links are directed, targets must pre-exist, and backlinks are observable via memory_get. But it omits other behavioral traits an agent may need — whether add is idempotent when a link already exists, whether a partially failing batch is transactional, or error behavior on missing targets. Adequate but with clear gaps.

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 sentences with no filler. The core action and domain are front-loaded in the first sentence, while the second adds examples plus two constraints (target existence, backlink visibility). Every clause 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 graph-modifying tool with a rich schema (enums fully enumerated, 100% param coverage) and no output schema, the description covers the essential operational facts: what it does, a prerequisite, and how to observe results. Minor omissions like idempotency and partial-failure behavior exist, but the essentials an agent needs to invoke it correctly are present.

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 the schema already documents all four parameters and the two enums (kind with six values, action with two). Per the baseline for high schema coverage, the description need not repeat parameter details. It does add genuine value by explaining the semantics of the link kinds ('tie a decision to the facts it depends on'), but that is contextual enrichment rather than compensation for a documentation gap.

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 states a specific verb (create/remove), a resource (directed links between memories), and names the domain ('relationship graph'). The examples — tying a decision to its facts, or a history entry to the decision it records — make the resource concrete and clearly distinguish this from sibling tools like memory_store (storing a memory) and memory_get (reading one). An agent can tell 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 Guidelines3/5

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

The examples imply when to use it (relating decisions, facts, history entries) and it states a concrete prerequisite ('Targets must exist'). It also routes the agent to memory_get for viewing backlinks. However, it never explicitly names alternatives or states when NOT to use this tool versus memory_update or memory_store. The usage context is present but implicit rather than explicit.

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