Graph Merge
graph_mergeMerge two entities into one by absorbing source into target, consolidating edges, and deleting source. Preview with dry_run to avoid data loss.
Instructions
Consolidate two entities into one — moves source's edges onto target, adopts source properties for keys target doesn't have, then deletes source. Inverse of graph_unmerge. Use after graph_merge_suggestions surfaces a duplicate pair, or whenever you've confirmed two nodes refer to the same thing. Same-tenant only; refuses to merge an entity with itself. Edges directly between source and target are dropped (would become self-loops). When source and target both have the same edge to a third node, the edge is consolidated and the higher weight wins. Target's embedding is cleared so the next graph_reembed will re-derive it from the merged state. Logged to logs/merge-audit.jsonl with reason. DESTRUCTIVE — always preview with dry_run=true first; recovery requires a graph_export backup or graph_unmerge with the original edge layout.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source_id | Yes | Entity ID to merge from (will be deleted) | |
| target_id | Yes | Entity ID to merge into (will absorb source) | |
| reason | Yes | Why merging (logged in audit) | |
| dry_run | No | Preview only, don't apply changes (default: false) |