Delete Object
delete_objectDelete 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
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | 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). | |
| handle | Yes | The record to delete. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects. | |
| objectType | Yes | Record type: person, family, event, place, source, citation, note, media, repository or tag. |