Skip to content

Search Documentation

Search across all documentation pages

add_link

Create a knowledge graph link between two nodes (notes and/or memories). Supports multiple relation types for expressing different kinds of relationships between knowledge artifacts.

Parameters#

ParameterTypeRequiredDescription
sourceTypestringrequiredType of the source node: note or memory
sourceIdstring (UUID)requiredID of the source node
targetTypestringrequiredType of the target node: note or memory
targetIdstring (UUID)requiredID of the target node
relationTypestringrequiredType of relationship: wiki_link, derived_from, contradicts, refines, part_of, supersedes, source_of, references, manual
labelstring (max 500 chars)optionalOptional display label for the link (will be encrypted)

Returns#

The created link object with its ID and full relationship details.

Example#

json
{
  "tool": "add_link",
  "arguments": {
    "sourceType": "note",
    "sourceId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "targetType": "memory",
    "targetId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "relationType": "source_of",
    "label": "Design doc that led to this decision"
  }
}