Skip to main content
Glama

link_memories

Connect two stored memories with a typed relationship so they become queryable edges in the knowledge graph, while rejecting unknown, self-referential, or duplicate links.

Instructions

Create a queryable edge between two memories.

relation_type is free text but keep it consistent, e.g. 'supersedes', 'relates_to', 'contradicts', 'links_to'.

This is what splitting a body into several memories costs: a [[uid]] written inside prose is a reference a reader follows, and only an edge created here is visible to get_relations() and to the graph.

Refuses an unknown uid, a memory related to itself, and an edge that already exists with that same type -- each as {"ok": False, "errors": [...]}, so a typo comes back as something to fix instead of a dangling edge or a raw database error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
to_uidYes
from_uidYes
relation_typeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/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 behavior burden and does well: it discloses validation rules (unknown uid, self-edge, duplicate edge with same relation_type) and the exact failure shape {"ok": False, "errors": [...]}. It does not mention permissions, transactionality, or whether an edge is reversible/deletable, so a small gap remains.

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?

The core action is front-loaded in one sentence, followed by the relation_type convention and the error contract. The 'what splitting a body into several memories costs' passage is motivational rather than operational, but it earns its place by justifying the tool's existence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter mutation tool with no annotations, no output schema, and 0% schema description coverage, the description covers the error contract and relation_type but leaves the 'note' parameter and uid semantics unexplained. Usable, but not complete enough to fully compensate for the missing structured metadata.

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%, so the description must compensate and only partly does. It documents relation_type as free text with example values, and from_uid/to_uid are implied as memory uids by context, but the optional 'note' parameter is never mentioned and no uid format is specified.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence states a specific verb and resource: 'Create a queryable edge between two memories.' It also names the downstream consumer, get_relations(), which implicitly separates it from sibling graph tools like diagram_link. It stops short of explicitly contrasting with diagram_edge/diagram_link, so it is clear but not fully sibling-differentiating.

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 explains the condition that motivates the tool: a [[uid]] inside prose is only a reference, whereas an edge is what get_relations() and the graph can see. That gives clear context for when to reach for it, but there is no explicit when-not or named alternative (e.g., when to prefer diagram_link instead).

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