Skip to main content
Glama

Create Place

create_place

Create a new place with names, type, coordinates, and enclosing places; search first to avoid duplicates and build place hierarchies top-down.

Instructions

Create a new place, such as a village, parish or county, with its names, type, coordinates and the larger places that contain it. Search first: no duplicate check is made, and an existing place is changed with update_place. Build hierarchies top-down: enclosedBy takes existing places only, each with optional dates for when the place belonged there, so create the county before its villages. name, nameLang and nameDate make the primary name and alternateNames the historical or other-language ones; an undated primary name hides dated alternate names. Events point here afterwards through placeHandle on create_event or update_event. Returns the new handle and Gramps ID with the stored name, type, coordinates and enclosing places, and next steps; an unknown type or unreadable date is rejected before anything is saved. For several new records that link to each other, such as the people, events, source and citation of one register entry, use create_records instead: one transaction, all created or none. 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.
lonNoLongitude in decimal degrees, east positive (21.0122). Text value. JSON strings are accepted; JSON numbers are also accepted and sent as text.
codeNoPlace code or postal code (optional).
nameYesPrimary name (required).
nameDateNoWhen the primary name applies (default: always). 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, e.g. pl or de (optional).
isPrivateNoMark the place private (default false).
placeTypeNoPlace type, e.g. Country, Province, County, City, Town, Village, Hamlet, Parish. 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. 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. Handles, not Gramps IDs: JSON array ["h1","h2"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {"ref":"…"}.
noteHandlesNoNotes. Handles, not Gramps IDs: JSON array ["h1","h2"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {"ref":"…"}.
mediaHandlesNoMedia. 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.
alternateNamesNoOther names: historical, other languages. 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. 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. 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. 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."
  2. Changed16 schema fields changedv2.3.0
    • changedInput schema / properties / alternateNames / description
      Previous value: -"Alternate place names. 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: +"Other names: historical, other languages. 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: -"Citation handles. 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. 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 / postal reference (optional)"New value: +"Place code or postal code (optional)."
    • changedInput schema / properties / enclosedBy / description
      Previous value: -"Parent place refs (enclosure hierarchy). 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. 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 / isPrivate / description
      Previous value: -"Mark record private (default: false)"New value: +"Mark the place private (default false)."
    • changedInput schema / properties / lat / description
      Previous value: -"Latitude coordinate"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."
    • removedInput schema / properties / lat / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
    • changedInput schema / properties / lon / description
      Previous value: -"Longitude coordinate"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."
    • removedInput schema / properties / lon / type
      Removed value: -[
      -  "string",
      -  "null"
      -]
    • changedInput schema / properties / mediaHandles / description
      Previous value: -"Media handles. 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. 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: -"Primary display name (required)."New value: +"Primary name (required)."
    • addedInput schema / properties / nameDate
      Added value: +{
      +  "default": null,
      +  "description": "When the primary name applies (default: always). 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 (default: omitted)"New value: +"Language code of the primary name, e.g. pl or de (optional)."
    • changedInput schema / properties / noteHandles / description
      Previous value: -"Note handles. 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. 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 key. Type values are validated by the server; see gramps://types resource or call get_reference(topic: \"types\") for available values."New value: +"Place type, e.g. Country, Province, County, City, Town, Village, Hamlet, Parish. 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: -"Tag handles. 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. Handles, not Gramps IDs: JSON array [\"h1\",\"h2\"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {\"ref\":\"…\"}."
  3. 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 only declare the generic mutation profile; the description adds the specific behaviours an agent cannot infer: no duplicate check, unknown type or unreadable date rejected before anything is saved, writes serialized one at a time, edit permission required, and locked/rate-limited writes returning a wait delay. It also describes the returned handle/Gramps ID and the follow-on placeHandle linkage to create_event/update_event.

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-loaded: purpose first, then usage, then behavioral constraints, then a routing pointer to get_reference for argument formats. It is long, but proportionate to a 14-parameter mutation tool; a few clauses (naming precedence, date-span rules) echo the schema and could have been left to it.

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 14-parameter write tool with no output schema, the description covers purpose, prerequisites (account with edit rights), failure modes (validation rejection, lock/rate limit with retry delay), return payload, and next steps. Nothing an agent needs in order to call it safely 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 baseline is 3; the description still earns above baseline by stating cross-parameter relationships (name/nameLang/nameDate form the primary name, alternateNames is for historical or other-language names, an undated primary name hides dated alternates) and the ordering constraint on enclosedBy. Most individual format detail, however, is already in the schema, so the added value is relational rather than comprehensive.

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 ("Create a new place") and enumerates the substance being created: names, type, coordinates, enclosing places. It distinguishes itself from update_place and create_records by name, so the agent can separate the three create/update paths 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 when-to-use rules: search first because no duplicate check exists, use update_place to modify, use create_records for several mutually-linking records in one transaction. It also gives sequencing guidance (build hierarchies top-down, create the county before its villages), which is real operational advice rather than filler.

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