Skip to main content
Glama
ianderso
by ianderso

uncite

Destructive

Remove a citation from a Gramps object, deleting it if orphaned, to clear citations attached to wrong facts or replaced by the real record.

Instructions

Detach a citation from an object, deleting it if it is left orphaned.

Detaching without deleting is how orphan citations accumulate: the fact the citation supported is gone, but the citation sits in the database still looking like evidence of something. Use this when a citation was attached to the wrong fact, or when a superseded bucket citation is replaced by the real record.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYesHandle or gramps_id of that object.
nameNoWith object_type='name' (ref is the person): which of the person's names to detach the citation from.
carry_toNoCitation (handle or gramps_id) to receive the notes and images only this citation holds, so it can be deleted without losing them.
citationYesCitation handle or gramps_id to remove.
object_typeYesType of the object to detach from.
delete_if_orphanNoDelete the citation if nothing else references it after detaching. Leave True unless you are keeping it deliberately. A citation that holds the only link to a note or image is kept unless carry_to is given.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.0.1
    • addedInput schema / $defs
      Added value: +{
      +  "NameMatch": {
      +    "additionalProperties": false,
      +    "description": "Which of a person's names. Every field given must match, ignoring case.\n\nget_person lists the names: the primary, and each alternate with its index.",
      +    "properties": {
      +      "given": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Given name(s) as stored."
      +      },
      +      "index": {
      +        "anyOf": [
      +          {
      +            "minimum": 0,
      +            "type": "integer"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Position among the alternate names, as get_person lists them. Only needed to tell identical duplicates apart."
      +      },
      +      "primary": {
      +        "anyOf": [
      +          {
      +            "type": "boolean"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "True: the primary name only. False: alternate names only."
      +      },
      +      "surname": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Surname as stored."
      +      },
      +      "type": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Name type: 'Birth Name', 'Also Known As', 'Married Name', ..."
      +      }
      +    },
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / carry_to
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Citation (handle or gramps_id) to receive the notes and images only this citation holds, so it can be deleted without losing them."
      +}
    • changedInput schema / properties / delete_if_orphan / description
      Previous value: -"Delete the citation if nothing else references it after detaching. Leave True unless you are keeping it deliberately."New value: +"Delete the citation if nothing else references it after detaching. Leave True unless you are keeping it deliberately. A citation that holds the only link to a note or image is kept unless carry_to is given."
    • addedInput schema / properties / name
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/NameMatch"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "With object_type='name' (ref is the person): which of the person's names to detach the citation from."
      +}
  2. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, but the description goes further and explains exactly what gets destroyed (the orphaned citation), why that matters (orphan citations accumulate and masquerade as evidence), and the preservation rule that a citation holding the only link to a note or image is kept unless carry_to is given. That is meaningful behavioral context beyond the annotation flags.

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?

The one-line summary is front-loaded and captures the core operation before the rationale paragraph. The second paragraph is somewhat discursive in explaining orphan accumulation, but it earns its space by motivating the delete_if_orphan default.

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?

Six parameters with full schema coverage and a destructive annotation mean the definition is nearly complete for an agent to call it correctly. It does not state required permissions or the shape of any return, but with no output schema and rich parameter docs those gaps are minor.

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 including carry_to, delete_if_orphan, and name is already fully documented in the schema. The description alludes to the orphan-deletion behavior but never names or elaborates on carry_to or name, so it adds no meaning beyond the structured fields. 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 a specific verb and resource ('Detach a citation from an object') plus the conditional side effect ('deleting it if it is left orphaned'). An agent can distinguish this from delete_object, detach_object, and cite_object purely from the first sentence, 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?

Gives explicit when-to-use conditions: 'when a citation was attached to the wrong fact, or when a superseded bucket citation is replaced by the real record.' It does not name the alternative tools (cite_object, detach_object, delete_object) so the routing to a sibling is left to inference, but the situational guidance is clear.

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