tag_object
Attach a named tag to any Gramps object, automatically creating the tag if it does not exist. Use exact name matching to reuse existing tags for cross-cutting labels like 'Verified'.
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'. | |
| 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'. |