v0.3.0 — structure-edit, destructive & blog CRUD tools
Highlights
This release grows the server from 16 to 28 MCP tools — 25 always-on plus 3 destructive tools behind an opt-in gate — adds a full blog-post CRUD surface, and introduces a ruff lint/format gate across the codebase. 193 tests green.
Wave 3 — structure-edit & destructive tools (#2)
gramps_set_family_parent— set the father/mother handle of an existing family.roleis an explicit bloodline slot (never inferred from gender); returns the previous handle. Non-destructive (PUT).gramps_remove_child_from_family— remove a child reference; raisesChildNotInFamilyErrorif the person isn't a child of that family. Non-destructive (PUT).gramps_delete_person(destructive) — strictconfirm is Trueplus a people-count guard; also cleans up notes orphaned by the deletion (shared notes are kept, reported viadeleted_notes).gramps_delete_family(destructive) — families-count guard; refuses to delete while children are still attached (FamilyNotEmptyError).
Destructive tools are hidden unless GRAMPS_ENABLE_DESTRUCTIVE=1 is set — they are not registered at all in the default deployment.
Wave 4 — blog CRUD & name fields (#3)
Blog posts (a Gramps Source tagged Blog with an HTML body note):
gramps_create_blog_post,gramps_list_blog_posts,gramps_get_blog_post,gramps_update_blog_post(partial read-modify-write, type-preserving),gramps_delete_blog_post(destructive, env-gated, orphan-note cleanup).- Body rendering is controlled by
GRAMPS_BLOG_BODY_FORMAT(html|text). HTML is sanitized through a bleach allow-list (keepsp/strong/a[href], stripsscript/img/on*handlers) — XSS-safe.
Name fields:
gramps_set_first_name(G12)gramps_add_alternate_name(G13a) — generalizes the formeradd_birth_name, which stays as an alias.gramps_swap_primary_name(G13b) — swapsprimary_namewith an alternate name by index.
Tooling & fixes
- Lint gate: ruff lint + format as a GitHub Action, pre-commit / pre-push hooks, and a required merge check on
main(#3). - Docker fix: the image now copies
gramps_blog.py, so the container no longer crashes on import (#4).
Known limitation
Flipping GRAMPS_BLOG_BODY_FORMAT between html and text on an existing post can render the stored body as an escaped literal — see docs/blog-crud.md §7.1.
Full changelog: v0.2.0...v0.3.0