dex_merge_contacts
Merge duplicate contacts in Dex CRM by consolidating multiple entries into a single primary contact with combined data.
Instructions
Merge two or more duplicate contacts into one. The first ID in the group becomes the primary contact that is kept and enriched with data from the others. You can merge multiple groups at once.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contactIds | Yes | Array of groups to merge — each group is an array of contact IDs (e.g. [['id1','id2']] merges id1 and id2) |
Implementation Reference
- src/tools/contacts.ts:239-252 (handler)The handler for dex_merge_contacts which performs a POST request to /v1/contacts/merge.
server.tool( "dex_merge_contacts", "Merge two or more duplicate contacts into one. The first ID in the group becomes the primary contact that is kept and enriched with data from the others. You can merge multiple groups at once.", { contactIds: z.array(z.array(z.string()).min(2)).min(1).describe("Array of groups to merge — each group is an array of contact IDs (e.g. [['id1','id2']] merges id1 and id2)") }, async (args) => { try { const result = await dex.post("/v1/contacts/merge", { contactIds: args.contactIds, }); return toResult(result); } catch (error) { return toError(error); } }