add_relation
Add a directed relation between two entities with a specified type and weight to model connections in a knowledge base.
Instructions
Add a directed relation between two entities.
Args: source_id: Source entity ID. target_id: Target entity ID. rel_type: Type of relation (CALLS, DEPENDS_ON, CONTAINS, etc.). weight: Relation strength (0.0 to 1.0).
Returns: Created relation details.
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>"
},
"name": "add_relation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| weight | No | ||
| rel_type | No | related_to | |
| source_id | Yes | ||
| target_id | Yes |