Skip to main content
Glama

Delete Object

delete_object
DestructiveIdempotent

Deletes a specified Gramps Web record after confirmation; if other records link to it, deletion is blocked and backlinks are returned so you can unlink them first or force deletion.

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. 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.

Input Schema

NameRequiredDescriptionDefault
forceNotrue deletes even when other records still point to it, leaving those links dangling (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. 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."
  2. First observedv2.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the destructiveHint annotation by disclosing the referential-integrity guard, the exact block-and-list-backlinks-by-type failure mode, the client-side confirmation dialog, the declined/cancelled signals, and the success and not-found responses. An agent knows the failure paths before calling.

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 effect and undo path are front-loaded, then preconditions, then failure modes, then return values. Dense but nearly every clause carries distinct, actionable information; only the return-value sentence borders on over-detail for a tool with no output schema.

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?

With no output schema, the description supplies the return payload (type, action: deleted, handle) and the not-found case, and covers the destructive-mutation risk profile fully. Nothing an agent needs to call this safely is missing.

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 schema already defines handle, objectType, and force. The description still adds genuine meaning for force by requiring a separate confirmation before using it, tying the parameter to an approval workflow rather than just its mechanic.

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?

"Delete one record" gives a specific verb, resource, and scope, distinguishing it from the update_* siblings that modify rather than remove records. It immediately links to the restore path (undo_change via get_recent_changes), which pins down its exact effect.

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?

Explicit preconditions are stated: only after the user confirms this exact record, and only after unlinking backlinks with the owners' update tools or passing force=true following a separate confirmation. It also tells the agent how to interpret declined/cancelled outcomes.

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