Skip to content

Edges

Create a directed edge between two nodes.

ParameterTypeRequiredDescription
source_idstringyesSource node ID
target_idstringyesTarget node ID
relationstringyesRelation type
metaobjectnoEdge metadata

Relation types (strictly enforced): related_to, belongs_to, applies, informed_by.

Duplicate edges (same source, target, and relation) are prevented.

Organization invariant on belongs_to: a non-organization node can have exactly one belongs_to -> organization edge. Attempting to create a second one is rejected with an actionable error. This is enforced both at the MCP tool layer and by a database trigger (prevent_multi_parent_org). To move a non-organization node to a different organization, disconnect the current belongs_to and connect to the new one in the same agent turn.

Returns: { id, source_id, target_id, relation }

Remove edge(s) between two nodes.

ParameterTypeRequiredDescription
source_idstringyesSource node ID
target_idstringyesTarget node ID
relationenumnoRelation to remove (omit to remove all)

Cannot orphan a node. The only belongs_to -> organization edge of a non-organization node cannot be removed — the call is rejected with a clear error. Enforced at the tool layer and by the prevent_orphan_on_edge_delete database trigger. To move a node to a new organization, perform the disconnect + reconnect as a single operation.

Returns: { disconnected: count }