Skip to main content
Glama

merge_records

Destructive

Merge duplicate records. Keeps keep_id, folds each drop_ids record's relations (calls/emails/campaigns/meetings/memory/channels/…) into it, then DELETES the duplicates. Fields: primary wins, its empty fields are filled from the duplicate, and field_overrides forces final values for conflicts. entity = 'lead'|'contact'|'account'. IRREVERSIBLE.

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": {
      "entity": "<entity>",
      "keep_id": "<keep_id>",
      "drop_ids": "<drop_ids>"
    },
    "name": "merge_records"
  }
}

Input Schema

NameRequiredDescriptionDefault
entityYeslead | contact | account
keep_idYesthe record to keep (primary)
drop_idsYesduplicate record ids to merge in and delete
field_overridesNofinal values for specific columns on the kept record (wins over primary+gap-fill)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag destructive=true and idempotent=false, but the description goes well beyond them: it enumerates the relation types that get re-parented, states that duplicates are DELETED, documents the field conflict resolution order (primary wins, empty fields gap-filled, field_overrides forces final values), and states IRREVERSIBLE in caps. That is exactly the behavioral context an agent needs before an irreversible write.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Roughly three sentences, front-loaded with the operation, then the merge algorithm, then the terminal 'IRREVERSIBLE.' Caps and the ellipsis keep the relation list short without losing meaning. No sentence is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive multi-record mutation with nested field_overrides and no output schema, the definition covers inputs, side effects, and conflict resolution thoroughly. The one gap is the response: with a sibling list_merge_log present, an agent is not told whether a merge log entry or result summary is produced.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns more by explaining the direction of the merge for each parameter — keep_id is the survivor, drop_ids are consumed and destroyed, and field_overrides takes precedence over both primary and gap-fill. It adds precedence semantics the schema only hints at.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource ('Merge duplicate records') and immediately specifies the mechanics: keep_id is retained, drop_ids relations are folded in, and the duplicates are deleted. An agent can tell this apart from sibling list_merge_log or the various search_/list_ record tools without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The scenario that selects this tool is clear (collapsing duplicate records of a given entity type), and the 'IRREVERSIBLE' warning functions as a strong precondition check. It stops short of naming alternatives or stating when NOT to merge (e.g. when reviewing prior merges via list_merge_log), so it lacks explicit routing.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.