Graph Merge
graph_mergeConsolidate duplicate entities by merging one into another, transferring edges and adopting missing properties. Preview with dry_run first as merging is destructive.
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.
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>",
"reason": "<reason>"
},
"name": "graph_merge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | Why merging (logged in audit) | |
| dry_run | No | Preview only, don't apply changes (default: false) | |
| source_id | Yes | Entity ID to merge from (will be deleted) | |
| target_id | Yes | Entity ID to merge into (will absorb source) |