Skip to main content
Glama

Update Repository

update_repository
DestructiveIdempotent

Change an existing repository's name, type, addresses, website, links, notes, or tags while leaving omitted fields unchanged. Use it to correct repository details after creation.

Instructions

Change an existing repository's name, type, address, website or links to notes and tags. For a new repository use create_repository; to remove one, delete_object. Which sources it holds, with their call numbers, is stored on the sources: change that with update_source (repositoryHandles), not here. addresses sets street, city, postal code, country and the other address fields, and urls sets links with their type and description; address is a shortcut for a single address with only a street line, and url for a single Web Home link. Each replaces every stored address or link; an empty address or url string, or addresses or urls [], removes them. A change shows on every source that lists the repository. 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, though the linked records themselves stay in the tree. Returns the handle and Gramps ID; a missing repository returns a not-found message, and an unknown type is rejected before anything is saved. Writes run one at a time and need a Gramps Web account allowed to edit the tree; a locked or rate-limited write fails with the delay to wait before retrying it.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "handle": "<handle>"
    },
    "name": "update_repository"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoNew website, stored as a single Web Home link; replaces every stored link, and an empty string removes them. Omit to leave unchanged.
nameNoNew name. Omit to leave unchanged.
urlsNoLinks with a type and an optional description, e.g. "Web Home: https://archive.example.org — reading room\nE-mail: info@archive.example.org". URLs: JSON array of {type,path,desc}, or strings "Web Home: https://…" with optional " — note" after URL, or lines/| separated. A type must be a standard Gramps URL type (E-mail, Web Home, Web Search, FTP, Unknown) or a custom one the tree already uses. Grammar: gramps://input-guide. Not together with url. Omit to keep; a value replaces the whole list and [] clears it, whatever linkMode says.
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, stored as the street of a single address; 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").
addressesNoPostal addresses with separate fields, e.g. "street: 12 High Street\ncity: London\npostal: SW1A 1AA\ncountry: United Kingdom". Addresses: JSON array of Gramps address objects; or text blocks with lines like street:, city:, … (blank line or --- between addresses); or one plain line = street only. Grammar: gramps://input-guide. Not together with address. Omit to keep; a value replaces the whole list and [] clears it, whatever linkMode says.
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. Changed4 schema fields changedv2.10.0
    • changedInput schema / properties / address / description
      Previous value: -"New postal address as one line; replaces every stored address, and an empty string removes them. Omit to leave unchanged."New value: +"New postal address as one line, stored as the street of a single address; replaces every stored address, and an empty string removes them. Omit to leave unchanged."
    • addedInput schema / properties / addresses
      Added value: +{
      +  "default": null,
      +  "description": "Postal addresses with separate fields, e.g. \"street: 12 High Street\\ncity: London\\npostal: SW1A 1AA\\ncountry: United Kingdom\". Addresses: JSON array of Gramps address objects; or text blocks with lines like street:, city:, … (blank line or --- between addresses); or one plain line = street only. Grammar: gramps://input-guide. Not together with address. Omit to keep; a value replaces the whole list and [] clears it, whatever linkMode says."
      +}
    • changedInput schema / properties / url / description
      Previous value: -"New website; replaces every stored link, and an empty string removes them. Omit to leave unchanged."New value: +"New website, stored as a single Web Home link; replaces every stored link, and an empty string removes them. Omit to leave unchanged."
    • addedInput schema / properties / urls
      Added value: +{
      +  "default": null,
      +  "description": "Links with a type and an optional description, e.g. \"Web Home: https://archive.example.org — reading room\\nE-mail: info@archive.example.org\". URLs: JSON array of {type,path,desc}, or strings \"Web Home: https://…\" with optional \" — note\" after URL, or lines/| separated. A type must be a standard Gramps URL type (E-mail, Web Home, Web Search, FTP, Unknown) or a custom one the tree already uses. Grammar: gramps://input-guide. Not together with url. Omit to keep; a value replaces the whole list and [] clears it, whatever linkMode says."
      +}
  2. 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."
  3. 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."
  4. First observedv2.2.0

TDQS

A4.6/5.0
Behavior4/5

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

Well beyond the annotations, the description discloses replacement semantics (addresses/urls replace the whole list; '' or [] clears them), linkMode behavior including that [] in replace mode drops all links while the linked records remain, that changes propagate to every source listing the repository, partial-update semantics, and the not-found/type-rejection/auth/rate-limit failure modes. Minor gap: it does not say what a rate-limited failure looks like in the returned payload beyond 'the delay to wait'.

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?

Long but front-loaded: purpose first, alternatives second, mechanics third, failure modes last. Sentences are dense and nearly all carry operational information, though the address/url replacement rules are restated in both the description and the per-parameter schema, which is mild redundancy.

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 an 11-parameter destructive mutation with no output schema, the description covers return value (handle and Gramps ID), error cases, concurrency (writes run one at a time), authorization prerequisites, and destructive edge cases. Nothing an agent needs before calling 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 a step above by synthesizing cross-parameter relationships the per-parameter schema cannot show — that 'address' and 'addresses' are mutually exclusive shortcuts versus full forms, the same for 'url' and 'urls', and that link lists follow linkMode while addresses and URLs do not.

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?

Opens with a specific verb and resource ('Change an existing repository's name, type, address, website or links to notes and tags') and immediately names the sibling tools it is not (create_repository, delete_object, update_source). An agent can distinguish this from every neighbouring mutation tool without opening a schema.

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

Usage Guidelines5/5

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

Explicit alternatives are given with the condition that selects them: use create_repository for a new one, delete_object to remove one, and update_source (repositoryHandles) to change which sources the repository holds. That last line pre-empts the most likely mis-invocation for this entity.

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