Skip to main content
Glama

Create Place

create_place

Create a new place with names, type, coordinates and enclosing parent places, building geographic 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").

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": {
      "name": "<name>"
    },
    "name": "create_place"
  }
}

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. The object may also carry "attributes" of this link (not of the media), in the forms of the attributes argument, such as ["Page: 12"]; their types are checked like media attributes.
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.10.0
    • changedInput schema / properties / mediaHandles / description
      Previous 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."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. The object may also carry \"attributes\" of this link (not of the media), in the forms of the attributes argument, such as [\"Page: 12\"]; their types are checked like media attributes."
  2. 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."
  3. 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\":\"…\"}."
  4. First observedv2.2.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/destructive/idempotent, but the description adds substantially more: no duplicate detection, atomic all-or-nothing behavior in the alternative tool, prerequisites (a Gramps Web account that can edit the tree), writes serialized one at a time, and locked/rate-limited writes returning a retry delay. It also describes validation- before-write semantics and reversed handle-not-ID conventions for enclosedBy vs enclosedByHandles.

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?

Purpose is front-loaded and the alternative-tool routing comes mid-paragraph, both correctly placed; nearly every clause carries new information. Some content overlaps the schema descriptions (primary vs alternate names, nameDate), and the closing pointer to get_reference for argument formats is slightly buried at the end rather than stated up front.

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 mutation with no output schema, the description covers the essential risks: return value shape (handle and Gramps ID), pre-save validation failures, permission and rate-limit behavior, duplicate risk, and the alternative transactional path. Little an agent needs before calling this correctly is left unstated.

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

Parameters5/5

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

With 100% schema coverage the baseline is 3, but the description earns more by explaining the interaction between name, nameLang, nameDate and alternateNames — notably that an undated primary name hides dated alternates — plus the top-down enclosedBy requirement with the Gramps-ID-vs-handle distinction. That is semantic meaning not derivable from the schema text alone.

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+resource ("Create a new place, such as a village, parish or county") and enumerates the payload (names, type, coordinates, containing places), which no sibling create_* tool covers. An agent can immediately distinguish this from create_event, create_records, or update_place.

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-to-use rules and named alternatives: search first because no duplicate check is made, use update_place to modify, use create_records for multi-record transactions, and create parents before children. It also states the ordering constraint (top-down) that governs call sequence — exactly the guidance an agent needs before invoking.

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