updateRelation
Modify properties of existing relationships of a given type between a source record and target records by setting or unsetting values; missing relationship pairs are skipped.
Instructions
Change the properties of existing relationships of one type between a record and target records: set writes values (null stores an explicit null), unset removes properties. Pairs without such a relationship are skipped; updated counts the relationships changed. Not available inside a transaction. Use findRelationships first to confirm the relationship type, direction and current properties.
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": {
"sourceId": "<sourceId>",
"relationType": "<relationType>"
},
"name": "updateRelation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| set | No | Properties to write on the relationships. Scalars or arrays of one scalar type; reserved RushDB/internal keys are rejected. | |
| types | No | Type of `set` properties whose JSON form is ambiguous, e.g. { "since": "datetime" } stores an ISO 8601 string as a datetime. Every name must also be in `set`. | |
| unset | No | Names of properties to remove from the relationships | |
| sourceId | Yes | ID of the source record | |
| targetId | No | ID of one target record (deprecated if targetIds provided) | |
| direction | No | outgoing: source → target (default); incoming: target → source | outgoing |
| targetIds | No | IDs of multiple target records | |
| relationType | Yes | Type of the relationships to update |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| message | Yes | ||
| success | Yes | ||
| updated | Yes |