Skip to main content
Glama
ianderso
by ianderso

merge_objects

Destructive

Combine duplicate Gramps records by absorbing one object into another, repointing references and unioning subordinate lists in one reversible transaction; dry-run first.

Instructions

Merge two objects that are the same thing. Dry-run by default.

This uses Gramps' own server-side merge: every reference to drop is re-pointed at keep and the subordinate lists are unioned, in one transaction. Do NOT do this by hand: a manual merge that misses one of the lists the dropped object carries loses what was on it.

Before merging, be sure they really are one thing. Two records OF the same event are two documents: an index entry and the register page it indexes stay separate, and merging them would turn two independent citations into one, silently weakening every fact that rested on both. Conversely, the same census page entered once per household member IS one document, and leaving the duplicates makes single-sourced facts look corroborated.

Reversible: the merge is one transaction, so list_transactions + undo_transaction can back it out.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dropYesHandle or gramps_id of the object absorbed into it.
keepYesHandle or gramps_id of the object that SURVIVES.
dry_runNoTrue (default) reports what would move without changing anything. Set False to apply.
object_typeYesperson, family, event, place, source, citation, repository, media, or note.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, but the description adds real behavior: dry-run is the default, the operation runs as a single atomic transaction, references to `drop` are re-pointed and subordinate lists unioned, and it is reversible via the transaction log. It also discloses the failure mode of the manual alternative (silent loss of dropped-object lists). Nothing here contradicts the annotations.

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

Conciseness4/5

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

Front-loaded with the action and the dry-run default, then proceeds in tight paragraphs covering mechanics, judgment criteria, and reversibility. It is longer than average, and the duplicated emphasis on the manual-merge hazard appears twice, but every sentence carries actionable content rather than filler.

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

Completeness5/5

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

For a 4-parameter mutation tool with no output schema, the description supplies everything an agent needs: default dry-run behavior, atomicity, reversibility route, and the domain judgment required to pick the right inputs. An agent could invoke this correctly without further documentation.

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, but the description adds meaning the schema does not: it explains mechanically what happens to `keep` vs `drop` (references re-pointed, lists unioned) and reinforces that dry_run returns what would move rather than applying it. It does not expand on the object_type enumeration beyond the schema's own list, keeping it short of a 5.

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 a specific verb and resource (merge two objects) with the crucial scope qualifier 'that are the same thing', which is exactly the judgment the tool demands. It is clearly distinguishable from siblings like find_duplicates (which locates candidates), delete_object (which removes), and detach_object (which unlinks rather than absorbs).

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

Usage Guidelines5/5

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

Goes well beyond a context hint: it gives explicit when-to-use and when-NOT-to-merge criteria with concrete counter-examples (an index entry vs. the register page it indexes stay separate; the same census page entered per household member IS one document). It also names the alternative path for reversal (list_transactions + undo_transaction) and warns against doing the merge by hand.

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