Skip to main content
Glama

merge_entities

Destructive

Consolidate duplicate medical literature entities by keeping one ID, folding others into it, and optionally renaming or retyping the survivor; this action cannot be undone.

Instructions

Merge entities into one (irreversible), and/or rename or retype an entity, by id. For pairs from list_duplicate_candidates use resolve_duplicates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonYesWhy; kept in the merge log
keep_idYesEntity that remains (id from find_entities)
projectNoProject name from list_projects; may be omitted when only one project exists
merge_idsYesEntities folded into keep_id; empty to only rename or retype
entity_typeNoNew type for keep_id
canonical_nameNoNew name for keep_id

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv0.1.10
    • addedInput schema / properties / canonical_name / description
      Added value: +"New name for keep_id"
    • addedInput schema / properties / entity_type / description
      Added value: +"New type for keep_id"
    • addedInput schema / properties / keep_id / description
      Added value: +"Entity that remains (id from find_entities)"
    • addedInput schema / properties / reason / description
      Added value: +"Why; kept in the merge log"
  2. First observedv0.1.1

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already carry destructiveHint=true and readOnlyHint=false, so the safety profile is largely covered. The description earns credit for sharpening the consequence ('irreversible') and clarifying that the destructive action is the folding of merge_ids into keep_id, which confirms the annotation rather than contradicting it. It still says nothing about non-idempotency, failure modes, or what happens when an id is invalid.

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?

Two sentences, no filler, with the irreversible warning front-loaded before the alternative routing. Every clause carries information.

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?

An output schema exists, so return-value detail is unnecessary, and the description covers mutability, irreversibility, and the key sibling alternative. Minor gaps remain around permissions or preconditions, but an agent has enough to invoke it correctly.

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 description coverage is 100%, so every parameter is already documented in the schema, including the empty-merge_ids rename/retype case and the merge log. The description only restates 'by id' and the rename/retype combination, adding no syntax or format detail beyond the schema. Baseline 3 applies.

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?

States specific verbs and resource: merge entities into one, and/or rename or retype, keyed by id. It also marks the operation as irreversible. An agent can distinguish it from list_duplicate_candidates and resolve_duplicates without opening any 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?

Explicitly routes one case elsewhere: pairs coming from list_duplicate_candidates should go to resolve_duplicates. That is a real when-not rule. It doesn't cover the remaining cases (e.g., multi-way merges not surfaced as duplicate candidates), so it stops short of full routing guidance.

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