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#
| Parameter | Type | Required | Description |
|---|---|---|---|
| sourceType | string | required | Type of the source node: note or memory |
| sourceId | string (UUID) | required | ID of the source node |
| targetType | string | required | Type of the target node: note or memory |
| targetId | string (UUID) | required | ID of the target node |
| relationType | string | required | Type of relationship: wiki_link, derived_from, contradicts, refines, part_of, supersedes, source_of, references, manual |
| label | string (max 500 chars) | optional | Optional 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"
}
}