link_memories
Create a queryable edge between two memories to track relationships in the graph and enable get_relations() queries. Validates uids and prevents self-links or duplicates with clear errors.
Instructions
Create a queryable edge between two memories.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"from_uid": "<from_uid>",
"to_uid": "<to_uid>",
"relation_type": "<relation_type>"
},
"name": "link_memories"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | why the two are related, kept on the edge. | |
| to_uid | Yes | the memory it points to. | |
| from_uid | Yes | the memory the edge starts at. | |
| relation_type | Yes | free text, but keep it consistent, e.g. 'supersedes', 'relates_to', 'contradicts', 'links_to'. |