Skip to main content
Glama

Delete Object

delete_object
DestructiveIdempotent

Delete a Gramps Web record after user confirmation; backlinks block deletion unless force is set, and the change can be undone from recent changes.

Instructions

Delete one record; undo_change with the deletion's transaction from get_recent_changes restores it. Call it only after the user confirmed this exact record. If other records still point to it, nothing is deleted and the reply lists those backlinks by type; unlink them first with the owners' update tools, or pass force=true after a separate confirmation, and Gramps Web removes those links. Gramps Web also deletes the citations of a deleted source and a family left without father, mother and children; the places inside a deleted place keep a link to it, so change their enclosedBy with update_place first. Clients that support it also show the user a confirmation dialog before deleting; action: declined or cancelled means the user said no and nothing was deleted. On success returns the type, action: deleted and the handle; a missing record returns a not-found message.

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": {
      "objectType": "<objectType>",
      "handle": "<handle>"
    },
    "name": "delete_object"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNotrue deletes even when other records still point to it, and Gramps Web removes those links (places inside a place keep theirs); only after the user confirmed that (default false).
handleYesThe record to delete. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects.
objectTypeYesRecord type: person, family, event, place, source, citation, note, media, repository or tag.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.11.0
    • changedInput schema / properties / force / description
      Previous value: -"true deletes even when other records still point to it, leaving those links dangling (default false)."New value: +"true deletes even when other records still point to it, and Gramps Web removes those links (places inside a place keep theirs); only after the user confirmed that (default false)."
  2. Changed3 schema fields changedv2.3.0
    • changedInput schema / properties / force / description
      Previous value: -"If true, delete despite backlinks. This may leave dangling references. Default false."New value: +"true deletes even when other records still point to it, leaving those links dangling (default false)."
    • changedInput schema / properties / handle / description
      Previous value: -"Object handle or Gramps ID (for example I0001). Handles are opaque API strings; Gramps IDs are resolved automatically."New value: +"The record to delete. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects."
    • changedInput schema / properties / objectType / description
      Previous value: -"Object type: person | family | event | place | source | citation | note | media | repository | tag."New value: +"Record type: person, family, event, place, source, citation, note, media, repository or tag."
  3. First observedv2.2.0

TDQS

A4.3/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is known. The description still adds real value beyond them: backlink blocking with a typed reply, cascade behavior per record type, the enclosedBy caveat, client-side confirmation with action: declined/cancelled, and the success/not-found response shapes. These are genuine behavioral disclosures the annotations cannot convey, though the delete is at least idempotent in effect (repeat yields not-found) which is not reconciled with the idempotentHint annotation.

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

Conciseness3/5

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

The critical constraint is front-loaded and every clause carries information, but the wall of semicolon-chained sentences is hard to scan and repeats the force/place-link caveat already in the schema. It could be restructured into short labeled sentences without losing content.

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 destructive tool with no output schema, the description covers success return shape, not-found behavior, backlink failure mode, cascade side effects, and the confirmation decision path. An agent has everything needed to call it and interpret every plausible outcome.

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 above that by explaining what objectType values imply for cascades (source citations deleted, family removed when left empty, enclosed places retaining links) which the enum list alone does not. The force parameter's meaning is largely a restatement of its schema description, so it is not fully additive.

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 ("Delete one record") and immediately bounds the scope to a single record, distinguishing it from batch/sibling operations. The cascade notes (sources, families, places) further clarify exactly what kind of delete this is.

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?

Explicitly gates invocation on user confirmation of "this exact record," and names concrete alternatives for blockers: unlink backlinks with the owners' update tools, change enclosedBy with update_place first, or use force=true after a separate confirmation. When-not conditions and fallbacks are both present.

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