Skip to main content
Glama

Link two memories with a typed edge

memory_link
Idempotent

Link two memories with a typed edge to map dependencies, cause/effect, supersession chains, or references. Use after memory_search to structure project knowledge.

Instructions

Create a typed directed edge between two memories. Edge types: relates_to, supersedes, caused_by, mitigated_by, references, implements. Use after memory_search to map dependencies, cause/effect, supersession chains, or references. Re-linking the same (from_id, to_id, edge_type) triple updates the weight (idempotent).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_idYesSource memory id (the edge points outward from this memory).
to_idYesTarget memory id.
edge_typeYesRelationship type. `supersedes` is the same notion used by `memory_store.supersedes_id`.
weightNoEdge strength in [0, 1]. Default 1.0. Lower values can be used to weaken weak "relates_to" hints.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYes`Edge created/updated: <from> -[<edge_type>:<weight>]-> <to>` on success, or `Memory <id> not found.` when either endpoint is missing.
Behavior4/5

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

Beyond idempotentHint in annotations, the description explains that re-linking updates weight, and clarifies the role of weight values. No contradictions with annotations.

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 sentences: core action, type list, usage + idempotency. No superfluous text, front-loaded with main verb-resource.

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?

Completeness is high given schema and annotations; output schema exists so return not needed. Covers purpose, types, usage, idempotency. Minor gap: no mention of error cases or 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?

Schema covers parameters 100%, but description adds nuance for edge_type meanings and weight usage (weakening weak hints). Adds value beyond schema.

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 clearly states the tool creates a typed directed edge between memories, enumerating specific edge types. This distinguishes it from sibling tools like memory_unlink.

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 advises using after memory_search to map dependencies, providing clear context. It also notes idempotent behavior for re-linking, though it does not explicitly state when not to use.

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/lfrmonteiro99/memento-mcp'

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