Skip to main content
Glama

Merge duplicate leads

dosai_merge_leads
Destructive

Merge duplicates of one person into the main lead: the duplicates are removed, their data moves to the main one. Cannot be undone. Two steps. Requires editor role.

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": {
      "project_id": "<project_id>",
      "primary_id": "<primary_id>",
      "duplicate_ids": "<duplicate_ids>"
    },
    "name": "dosai_merge_leads"
  }
}

Input Schema

NameRequiredDescriptionDefault
primary_idYesFrom dosai_list_leads.
project_idYesFrom dosai_list_projects.
confirm_tokenNoLeave empty on the first call: it changes nothing and returns what will happen and a code. Ask the owner; only after their explicit "yes" call again with the same arguments and this code.
duplicate_idsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / primary_id / description
      Previous value: -"Lead id, as returned by dosai_list_leads."New value: +"From dosai_list_leads."
  2. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedInput schema / properties / project_id / description
      Previous value: -"Project id, as returned by dosai_list_projects."New value: +"From dosai_list_projects."
  3. Changed3 schema fields changed
    • removedInput schema / properties / duplicate_ids / items / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / primary_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    • removedInput schema / properties / project_id / pattern
      Removed value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
  4. Added

TDQS

A4/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true), the description discloses what is destroyed ('the duplicates are removed'), where the data goes ('their data moves to the main one'), that the action is irreversible ('Cannot be undone'), and the authorization requirement ('Requires editor role'). That is precisely the behavioral context an agent needs before invoking a destructive merge.

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?

Four short sentences, front-loaded with the destructive consequence and irreversibility; nothing is redundant. The telegraphic fragments are efficient rather than vague.

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 4-parameter tool with no output schema, the description covers safety, role requirements, and the two-step confirmation. Remaining gaps – what happens to related records, the 50-duplicate cap, and failure behavior – are secondary but would improve confidence.

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

Parameters3/5

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

Schema coverage is 75% and the schema itself richly documents the confirm_token two-step flow and the source of primary_id/project_id, so the schema does the heavy lifting. The description's 'Two steps' reinforces the confirmation semantics but adds nothing the parameter descriptions do not already say.

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

Purpose4/5

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

The description states a specific verb and resource ('Merge duplicates of one person into the main lead') and clarifies the outcome ('duplicates are removed, their data moves to the main one'). It does not explicitly name or differentiate itself from siblings such as dosai_delete_leads or dosai_bulk_leads, so it stops short of a 5.

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

Usage Guidelines3/5

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

Usage is implied – call it when one person has duplicate lead records – and a prerequisite is stated ('Requires editor role'). There is no explicit when-not guidance and no named alternative for cases where the agent should delete or deduplicate differently.

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.

Resources