Skip to main content
Glama

Update Repository

update_repository

Change 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

TableJSON Schema
NameRequiredDescriptionDefault
urlNoNew website; replaces every stored link, and an empty string removes them. Omit to leave unchanged.
nameNoNew name. Omit to leave unchanged.
handleYesThe repository to change. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects.
addressNoNew postal address as one line; replaces every stored address, and an empty string removes them. Omit to leave unchanged.
linkModeNoHow 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
repoTypeNoNew 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").
isPrivateNotrue makes the record private, false public. Omit to leave unchanged.
tagHandlesNoTags. 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":"…"}.
noteHandlesNoNotes. 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":"…"}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.3.1
    • changedInput schema / properties / linkMode / description
      Previous value: -"How to apply all supplied link lists: replace (default) replaces each full list; 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."New value: +"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."
  2. Changed8 schema fields changedv2.3.0
    • changedInput schema / properties / address / description
      Previous value: -"Street line (replaces address list when set). Omit to leave unchanged."New value: +"New postal address as one line; replaces every stored address, and an empty string removes them. Omit to leave unchanged."
    • changedInput schema / properties / handle / description
      Previous value: -"Repository handle. Handle or Gramps ID (e.g. I0001). Handles are opaque strings from the API. Gramps IDs (like I0001, F0023) are auto-resolved to handles. Find handles with search() or list_objects()."New value: +"The repository to change. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects."
    • changedInput schema / properties / isPrivate / description
      Previous value: -"Private flag. Omit to leave unchanged."New value: +"true makes the record private, false public. Omit to leave unchanged."
    • changedInput schema / properties / name / description
      Previous value: -"Name. Omit to leave unchanged."New value: +"New name. Omit to leave unchanged."
    • changedInput schema / properties / noteHandles / description
      Previous value: -"Linked notes. Omit to leave unchanged. For link lists, linkMode controls replace/add/remove; [] clears in replace mode and does nothing in add/remove. Other lists always use replacement. Handles: JSON array [\"h1\",\"h2\"], a single handle as a plain string, comma/semicolon/newline-separated list, or a JSON-array string. Array entries may be strings or objects {\"ref\":\"…\"} / {\"handle\":\"…\"}."New value: +"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\":\"…\"}."
    • changedInput schema / properties / repoType / description
      Previous value: -"Type. Omit to leave unchanged. Type values are validated by the server; see gramps://types resource or call get_reference(topic: \"types\") for available values."New value: +"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\")."
    • changedInput schema / properties / tagHandles / description
      Previous value: -"Linked tags. Omit to leave unchanged. For link lists, linkMode controls replace/add/remove; [] clears in replace mode and does nothing in add/remove. Other lists always use replacement. Handles: JSON array [\"h1\",\"h2\"], a single handle as a plain string, comma/semicolon/newline-separated list, or a JSON-array string. Array entries may be strings or objects {\"ref\":\"…\"} / {\"handle\":\"…\"}."New value: +"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\":\"…\"}."
    • changedInput schema / properties / url / description
      Previous value: -"Website URL (replaces url list when set). Omit to leave unchanged."New value: +"New website; replaces every stored link, and an empty string removes them. Omit to leave unchanged."
  3. First observedv2.2.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With annotations only declaring readOnlyHint=false and destructiveHint=false, the description carries real weight: it discloses that replace mode with [] REMOVES every link of that kind, that unknown types are rejected before saving, that a missing handle yields a not-found message, and what is returned (handle and Gramps ID). This is precisely the destructive/error semantics an agent needs and annotations do not supply.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The mutable fields and the omit-means-unchanged rule are front-loaded, followed by linkMode semantics, return/error behavior, and one scoping caveat. Dense but every sentence carries information; the linkMode sentence is long and partially overlaps the schema, which keeps it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter mutation tool with no output schema, the description covers the update contract, the linkMode matrix, the return value, and the two failure modes (missing handle, unknown type). Nothing needed to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns extra by explaining how linkMode interacts across all supplied link lists and by clarifying a conceptual boundary not in the schema (which sources a repository holds lives on the sources' repositoryHandles, not here). Some linkMode wording duplicates the schema, but the cross-parameter framing adds meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Change) and resource (an existing repository), then enumerates the mutable fields, so the agent immediately knows this is a partial-update for repositories and not for people, sources, or families. It is readily distinguishable from the other update_* siblings by the resource it names.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Pass only what changes; omitted arguments stay as they are" is a clear usage contract, and "Use separate calls to add and remove" gives concrete operational guidance for linkMode. It stops short of explicitly contrasting with create_repository or delete_object, so the alternative-selection guidance is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.