create_relation
Establish typed connections between memory nodes to build semantic relationships within codebases, supporting various relation types with weighted edges that update automatically.
Instructions
Create a typed edge between two memory nodes. Supports relation types: relates_to, depends_on, implements, references, similar_to, contains. Edges have weights (0-1) that decay over time via e^(-λt). Duplicate edges update weight instead of creating new ones.
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": {
"source_id": "<source_id>",
"target_id": "<target_id>",
"relation": "<relation>"
},
"name": "create_relation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_id | Yes | ID of the source memory node. | |
| target_id | Yes | ID of the target memory node. | |
| relation | Yes | Relationship type between nodes. | |
| weight | No | Edge weight 0-1. Higher = stronger relationship. Default: 1.0. | |
| metadata | No | Optional key-value metadata for the edge. |