Skip to main content
Glama

Update Place

update_place
DestructiveIdempotent

Modify an existing place's names, coordinates, type, and links to notes/media/citations in Gramps Web; changes apply to all events at that place.

Instructions

Change an existing place's names, type, coordinates, code, enclosing places or links to notes, media, citations and tags. The change shows on every event at this place: if only one event names the wrong place, give that event another placeHandle with update_event instead. For a new place use create_place; to remove one, delete_object. name, nameLang and nameDate each change one part of the primary name, alternateNames replaces all the other names, and an empty string clears lat, lon or nameDate. 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 with the stored name, type, coordinates and enclosing places; a missing place returns a not-found message, and an unknown type or unreadable date 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. Formats of every argument: get_reference(topic: "input-guide").

Input Schema

NameRequiredDescriptionDefault
latNoLatitude in decimal degrees, north positive (52.2297). Text value. JSON strings are accepted; JSON numbers are also accepted and sent as text. Omit to keep the current value; pass an empty string to remove it.
lonNoLongitude in decimal degrees, east positive (21.0122). Text value. JSON strings are accepted; JSON numbers are also accepted and sent as text. Omit to keep the current value; pass an empty string to remove it.
codeNoNew place code. Omit to leave unchanged.
nameNoNew primary name. Omit to leave unchanged.
handleYesThe place to change. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects.
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
nameDateNoWhen the primary name applies. Omit to keep the current date; pass an empty string to remove it. Gramps shows the first name, primary first, whose date is empty or matches the event date, so an undated primary name hides dated alternate names: date the primary name too ("from 1937-02-10"). Dashes are spans; open "1991-" / "from 1991" are From. Unreadable dates are rejected.
nameLangNoLanguage code of the primary name. Omit to leave unchanged.
isPrivateNotrue makes the record private, false public. Omit to leave unchanged.
placeTypeNoNew place type. 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").
enclosedByNoPlaces that contain this one. Omit to keep; applied per linkMode. Parent place refs via enclosedBy (not enclosedByHandles): handle or Gramps ID, array of them, JSON array of {ref, date?}, or shorthand "HANDLE::1920-1950" (date optional). Place dashes are spans (from…to); open "1991-" / "from 1991" are From. English months OK: "HANDLE::from 1 Oct 1929 to 27 Sep 1937". Examples: [{ref:"…", date:"1708-1927"}], "HANDLE::1991-", date "1703-1914-08-31". Unrecognized dates fail validation. Smaller region → larger region order. See get_reference(topic: "input-guide", section: "dates").
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":"…"}.
mediaHandlesNoMedia. Omit to keep; applied per linkMode. Media handles, not Gramps IDs: JSON array ["h1","h2"], one handle, or a comma/semicolon/newline-separated string. To show only part of an image, such as one record on a page scan, give an object {"ref":"…","region":[left, top, right, bottom]} in place of the handle. A region is [left, top, right, bottom]: its edges in percent of the image width and height, 0 to 100, measured from the top-left corner; [10, 20, 60, 45] runs from 10% to 60% across and from 20% to 45% down. [0, 0, 100, 100] shows the whole image again; read_media with the same region shows what it covers. A plain handle keeps the region its link has. In add mode a media already shown keeps its link and takes the region given; to show two regions of one image, list it twice, each with its region.
alternateNamesNoAlternate names. Omit to keep; a value replaces the whole list and [] clears it, whatever linkMode says. Alternate place names: array of strings ("Old Name" or "Old Name::de"), simple objects {value, lang?, date?}, or JSON array. Dated example: [{value:"New York", date:"1914-08-31-1924-01-26"}] or date "from 5 Jul 1944". Place dashes are spans (from…to); open "1991-" / "from 1991" are From. Unrecognized dates fail validation (see get_reference(topic: "input-guide", section: "dates")).
citationHandlesNoCitations. 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.5.1
    • changedInput schema / properties / mediaHandles / description
      Previous value: -"Media. 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\":\"…\"}."New value: +"Media. Omit to keep; applied per linkMode. Media handles, not Gramps IDs: JSON array [\"h1\",\"h2\"], one handle, or a comma/semicolon/newline-separated string. To show only part of an image, such as one record on a page scan, give an object {\"ref\":\"…\",\"region\":[left, top, right, bottom]} in place of the handle. A region is [left, top, right, bottom]: its edges in percent of the image width and height, 0 to 100, measured from the top-left corner; [10, 20, 60, 45] runs from 10% to 60% across and from 20% to 45% down. [0, 0, 100, 100] shows the whole image again; read_media with the same region shows what it covers. A plain handle keeps the region its link has. In add mode a media already shown keeps its link and takes the region given; to show two regions of one image, list it twice, each with its region."
  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. Changed17 schema fields changedv2.3.0
    • changedInput schema / properties / alternateNames / description
      Previous value: -"Replace alternate place names. 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. Alternate place names: array of strings (\"Old Name\" or \"Old Name::de\"), simple objects {value, lang?, date?}, or JSON array. Dated example: [{value:\"New York\", date:\"1914-08-31-1924-01-26\"}] or date \"from 5 Jul 1944\". Place dashes are spans (from…to); open \"1991-\" / \"from 1991\" are From. Unrecognized dates fail validation (see get_reference(topic: \"input-guide\", section: \"dates\"))."New value: +"Alternate names. Omit to keep; a value replaces the whole list and [] clears it, whatever linkMode says. Alternate place names: array of strings (\"Old Name\" or \"Old Name::de\"), simple objects {value, lang?, date?}, or JSON array. Dated example: [{value:\"New York\", date:\"1914-08-31-1924-01-26\"}] or date \"from 5 Jul 1944\". Place dashes are spans (from…to); open \"1991-\" / \"from 1991\" are From. Unrecognized dates fail validation (see get_reference(topic: \"input-guide\", section: \"dates\"))."
    • changedInput schema / properties / citationHandles / description
      Previous value: -"Linked citations. 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: +"Citations. 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 / code / description
      Previous value: -"Place code. Omit to leave unchanged."New value: +"New place code. Omit to leave unchanged."
    • changedInput schema / properties / enclosedBy / description
      Previous value: -"Linked parent place chain. 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. Parent place refs via enclosedBy (not enclosedByHandles): handle string, array of handles, JSON array of {ref, date?}, or shorthand \"HANDLE::1920-1950\" (date optional). Place dashes are spans (from…to); open \"1991-\" / \"from 1991\" are From. English months OK: \"HANDLE::from 1 Oct 1929 to 27 Sep 1937\". Examples: [{ref:\"…\", date:\"1708-1927\"}], \"HANDLE::1991-\", date \"1703-1914-08-31\". Unrecognized dates fail validation. Smaller region → larger region order. See get_reference(topic: \"input-guide\", section: \"dates\")."New value: +"Places that contain this one. Omit to keep; applied per linkMode. Parent place refs via enclosedBy (not enclosedByHandles): handle or Gramps ID, array of them, JSON array of {ref, date?}, or shorthand \"HANDLE::1920-1950\" (date optional). Place dashes are spans (from…to); open \"1991-\" / \"from 1991\" are From. English months OK: \"HANDLE::from 1 Oct 1929 to 27 Sep 1937\". Examples: [{ref:\"…\", date:\"1708-1927\"}], \"HANDLE::1991-\", date \"1703-1914-08-31\". Unrecognized dates fail validation. Smaller region → larger region order. See get_reference(topic: \"input-guide\", section: \"dates\")."
    • changedInput schema / properties / handle / description
      Previous value: -"Place 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 place 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 / lat / description
      Previous value: -"Latitude string. Omit to leave unchanged."New value: +"Latitude in decimal degrees, north positive (52.2297). Text value. JSON strings are accepted; JSON numbers are also accepted and sent as text. Omit to keep the current value; pass an empty string to remove it."
    • removedInput schema / properties / lat / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
    • changedInput schema / properties / lon / description
      Previous value: -"Longitude string. Omit to leave unchanged."New value: +"Longitude in decimal degrees, east positive (21.0122). Text value. JSON strings are accepted; JSON numbers are also accepted and sent as text. Omit to keep the current value; pass an empty string to remove it."
    • removedInput schema / properties / lon / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
    • changedInput schema / properties / mediaHandles / description
      Previous value: -"Linked media. 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: +"Media. 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 / name / description
      Previous value: -"Name text. Omit to leave unchanged."New value: +"New primary name. Omit to leave unchanged."
    • addedInput schema / properties / nameDate
      Added value: +{
      +  "default": null,
      +  "description": "When the primary name applies. Omit to keep the current date; pass an empty string to remove it. Gramps shows the first name, primary first, whose date is empty or matches the event date, so an undated primary name hides dated alternate names: date the primary name too (\"from 1937-02-10\"). Dashes are spans; open \"1991-\" / \"from 1991\" are From. Unreadable dates are rejected.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / nameLang / description
      Previous value: -"Language code for primary name. Omit to leave unchanged."New value: +"Language code of the primary 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 / placeType / description
      Previous value: -"Place 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 place type. 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\":\"…\"}."
  4. First observedv2.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare write/destructive/idempotent, and the description goes well beyond them: in replace mode an empty list REMOVES every link of that kind while linked records remain; missing place returns a not-found message; unknown type or unreadable date is rejected before anything is saved; writes are serialized, require an edit-capable Gramps Web account, and rate-limited writes return the delay to wait. This is unusually rich operational context.

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?

Front-loads the verb and scope, then alternatives, then semantics, then errors — a sensible order. It is dense and long, but for a 16-parameter mutation tool almost every sentence carries load; only the detailed linkMode/clearing rules push it near over-length.

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 16-param write tool with no output schema, the description covers what is returned (handle, Gramps ID, stored name/type/coordinates/enclosing places), failure modes, permission and rate-limit behavior, and points to get_reference for argument formats. Nothing an agent needs to call 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, but the description adds real meaning: how name/nameLang/nameDate jointly edit the primary name, that alternateNames replaces the other names entirely, that empty strings clear lat/lon/nameDate, and that omitted arguments are preserved. The linkMode semantics governing all link lists further clarify parameter behavior beyond the schema.

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 and resource ('Change an existing place's names, type, coordinates, code, enclosing places or links') and enumerates exactly which fields are mutable. It explicitly distinguishes itself from create_place, delete_object and update_event, so an agent can route correctly without opening any 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?

Gives explicit when-not guidance: use update_event if only one event names the wrong place, create_place for a new place, delete_object to remove one. It also advises separate calls to add and remove versus replace to edit link metadata, covering alternative invocation strategies.

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