Update Repository
update_repositoryChange an existing repository's name, type, address, website, notes, tags, or private flag. Pass only what changes; omitted arguments stay unchanged.
Instructions
Change an existing repository: name, type, address, website, notes, tags or the private flag. Pass only what changes; omitted arguments stay as they are. Link lists (…Handles, …Refs) follow linkMode: replace (default) sets the whole list, add appends, remove drops the given handles; in replace mode [] REMOVES every link of that kind. Returns the handle and Gramps ID; a missing repository returns a not-found message, and an unknown type is rejected before anything is saved. Which sources it holds is stored on the sources (their repositoryHandles), not here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | New website; replaces every stored link, and an empty string removes them. Omit to leave unchanged. | |
| name | No | New name. Omit to leave unchanged. | |
| handle | Yes | The repository to change. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects. | |
| address | No | New postal address as one line; replaces every stored address, and an empty string removes them. Omit to leave unchanged. | |
| linkMode | No | How to apply all supplied link lists: replace (default) replaces each full list, and a link it keeps keeps its stored privacy, citations, notes and crop unless the call sends new values; add appends missing handles and preserves existing link metadata; remove removes all links matching supplied handles (reference metadata is ignored). Omitted lists stay unchanged; empty lists clear only in replace mode. Does not affect attributes, names, addresses or URLs. Use separate calls to add and remove, or replace to edit existing link metadata. | replace |
| repoType | No | New type, e.g. Archive, Library, Church. Omit to leave unchanged. Must be a standard Gramps type or a custom one the tree already uses; anything else is rejected with suggestions. List: get_reference(topic: "types"). | |
| isPrivate | No | true makes the record private, false public. Omit to leave unchanged. | |
| tagHandles | No | Tags. Omit to keep; applied per linkMode. Handles, not Gramps IDs: JSON array ["h1","h2"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {"ref":"…"}. | |
| noteHandles | No | Notes. Omit to keep; applied per linkMode. Handles, not Gramps IDs: JSON array ["h1","h2"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {"ref":"…"}. |