tag_object
Attach a named tag to a Gramps object, creating it if missing, so you can label records like Verified or Needs review for cross-cutting organization.
Instructions
Attach a named Tag to an object, creating the Tag if it doesn't exist yet.
Tags are lightweight cross-cutting labels ('Verified', 'Needs review', 'DNA-confirmed'). Matching is by exact name; an existing tag is reused.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tag | Yes | Tag name (found-or-created by exact match), e.g. 'Verified'. To REMOVE a tag: detach_object(child_kind='tag', child=<tag name>). | |
| color | No | Optional hex color for a newly-created tag, e.g. '#FF8800'. Defaults to '#4444FF'. Ignored if the tag already exists. | |
| target | Yes | Handle or gramps_id of the object to tag. | |
| object_type | Yes | Type of the object to tag: 'person', 'family', 'event', 'source', 'citation', 'place', 'repository', 'media', 'note'. |