Skip to content
Docs menu

Tool reference · Edit, history & reports

memory_relate

Links two records with a typed relation so graph-based search can pull one in when the other matches.

local stdio server writes

When to use

  • A solution fixes a specific problem record and you want them found together.
  • Two records contradict each other and you want that recorded.
  • One decision caused another and you want the link to be explicit.

Parameters

NameTypeDefaultDescription
from_idrequired integer — Source knowledge record ID
to_idrequired integer — Target knowledge record ID
typerequired "causal" | "solution" | "context" | "related" | "contradicts" — Relation type

Example

Arguments

{
  "from_id": 1850,
  "to_id": 1842,
  "type": "solution"
}

Result shape

{
  "created": true,
  "from_id": 1850,
  "to_id": 1842,
  "type": "solution"
}

If the same relation already exists the result has exists: true instead of created.

Values are illustrative; the keys follow the server's handler. MCP clients receive the result as JSON text content.

Server description

The description the server sends to your agent in tools/list, captured from the v14.7.0 source:

Create a typed relation between two knowledge records. Enriches graph expansion in Tier 4 search. Types: causal, solution, context, related, contradicts.

Found a mistake? Open an issue on GitHub.

Search