Skip to main content
Glama

Create Family

create_family

Create a family record by linking existing parents, children, and events such as marriage, with relationship and child-relation types.

Instructions

Create a family: a couple (father and mother, each optional) with their relationship type, children and family events such as Marriage. People and events must already exist (create_person, create_event). Gramps Web links the father, mother and children back to the family in the same save, and if one of them does not exist it refuses the family and nothing is saved. relationshipType stays Unknown unless a source records the marriage: then pass Married and link the Marriage event in eventRefs, where a family event takes the Family role, which is what makes Gramps and Gramps Web show the family among the event's participants. Each child in childRefs carries its own relation to the father and to the mother, Birth unless the source says Adopted, Stepchild or another; children keep the order given, so list them by birth. Citations, notes, media, tags and attributes passed here belong to the family itself, not to its members or events. Returns the new handle, Gramps ID and stored relationship type; when children or events were left out, it also lists the update_family calls that add them with linkMode add. Does not check for duplicates: look at the parents' families first, and change an existing family with update_family. Children are added here through childRefs, not through the child's parentFamilyHandles. 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

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "create_family"
  }
}

Input Schema

NameRequiredDescriptionDefault
childRefsNoChildren, each with its relation to the father and mother (Birth by default; Adopted, Stepchild, …). Child references (handles, not Gramps IDs): JSON array of {ref, frel, mrel}, strings "HANDLE::RelType" (sets both frel and mrel; default: Birth), comma/pipe/newline-separated, or a single handle. A relation must be a standard Gramps one (Birth, Adopted, Stepchild, Sponsored, Foster, Unknown, None) or a custom one the tree already uses. JSON objects accept snake_case (frel, mrel, tag_list) or camelCase (fatherRel, tagList, etc.).
eventRefsNoExisting family events such as Marriage or Divorce. Event references (handles, not Gramps IDs): JSON array of {ref, role}, strings "HANDLE::Role" (default role: Primary on a person, Family on a family), comma/pipe/newline-separated, or a single handle. A role must be a standard Gramps role or a custom one the tree already uses; anything else is rejected with suggestions. An object may carry "attributes" of this one participant's part, such as the age a register gives: {"ref":"…","role":"Primary","attributes":["Age: 65"]}, in the forms of the attributes argument; their types are checked like attributes. JSON objects accept snake_case or camelCase list fields (note_list / noteList).
isPrivateNoMark the family private (default false).
attributesNoAttributes: JSON array of objects {type,value,...}, or strings "Type: Value" (first colon), or one string with lines or | between entries. A type must be a standard Gramps attribute type or a custom one the tree already uses; anything else is rejected with suggestions. Full grammar: gramps://input-guide.
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":"…"}.
fatherHandleNoThe father, optional. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects.
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.
motherHandleNoThe mother, optional. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects.
citationHandlesNoCitations. Handles, not Gramps IDs: JSON array ["h1","h2"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {"ref":"…"}.
relationshipTypeNoRelationship type: Married, Unmarried, Civil Union or Unknown (default, as in Gramps). Pass Married when a source records the marriage. 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").Unknown

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.10.0
    • changedInput schema / properties / eventRefs / description
      Previous value: -"Existing family events such as Marriage or Divorce. Event references (handles, not Gramps IDs): JSON array of {ref, role}, strings \"HANDLE::Role\" (default role: Primary on a person, Family on a family), comma/pipe/newline-separated, or a single handle. A role must be a standard Gramps role or a custom one the tree already uses; anything else is rejected with suggestions. JSON objects accept snake_case or camelCase list fields (note_list / noteList)."New value: +"Existing family events such as Marriage or Divorce. Event references (handles, not Gramps IDs): JSON array of {ref, role}, strings \"HANDLE::Role\" (default role: Primary on a person, Family on a family), comma/pipe/newline-separated, or a single handle. A role must be a standard Gramps role or a custom one the tree already uses; anything else is rejected with suggestions. An object may carry \"attributes\" of this one participant's part, such as the age a register gives: {\"ref\":\"…\",\"role\":\"Primary\",\"attributes\":[\"Age: 65\"]}, in the forms of the attributes argument; their types are checked like attributes. JSON objects accept snake_case or camelCase list fields (note_list / noteList)."
    • 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. Changed3 schema fields changedv2.8.1
    • changedInput schema / properties / eventRefs / description
      Previous value: -"Existing family events such as Marriage or Divorce. Event references (handles, not Gramps IDs): JSON array of {ref, role}, strings \"HANDLE::Role\" (default role: Primary), comma/pipe/newline-separated, or a single handle. A role must be a standard Gramps role or a custom one the tree already uses; anything else is rejected with suggestions. JSON objects accept snake_case or camelCase list fields (note_list / noteList)."New value: +"Existing family events such as Marriage or Divorce. Event references (handles, not Gramps IDs): JSON array of {ref, role}, strings \"HANDLE::Role\" (default role: Primary on a person, Family on a family), comma/pipe/newline-separated, or a single handle. A role must be a standard Gramps role or a custom one the tree already uses; anything else is rejected with suggestions. JSON objects accept snake_case or camelCase list fields (note_list / noteList)."
    • changedInput schema / properties / relationshipType / default
      Previous value: -"Married"New value: +"Unknown"
    • changedInput schema / properties / relationshipType / description
      Previous value: -"Relationship type: Married (default), Unmarried, Civil Union or Unknown. 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\")."New value: +"Relationship type: Married, Unmarried, Civil Union or Unknown (default, as in Gramps). Pass Married when a source records the marriage. 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\")."
  3. 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."
  4. Changed3 schema fields changedv2.3.2
    • changedInput schema / properties / attributes / description
      Previous value: -"Attributes: JSON array of objects {type,value,...}, or strings \"Type: Value\" (first colon), or one string with lines or | between entries. Full grammar: gramps://input-guide."New value: +"Attributes: JSON array of objects {type,value,...}, or strings \"Type: Value\" (first colon), or one string with lines or | between entries. A type must be a standard Gramps attribute type or a custom one the tree already uses; anything else is rejected with suggestions. Full grammar: gramps://input-guide."
    • changedInput schema / properties / childRefs / description
      Previous value: -"Children, each with its relation to the father and mother (Birth by default; Adopted, Stepchild, …). Child references (handles, not Gramps IDs): JSON array of {ref, frel, mrel}, strings \"HANDLE::RelType\" (sets both frel and mrel; default: Birth), comma/pipe/newline-separated, or a single handle. JSON objects accept snake_case (frel, mrel, tag_list) or camelCase (fatherRel, tagList, etc.)."New value: +"Children, each with its relation to the father and mother (Birth by default; Adopted, Stepchild, …). Child references (handles, not Gramps IDs): JSON array of {ref, frel, mrel}, strings \"HANDLE::RelType\" (sets both frel and mrel; default: Birth), comma/pipe/newline-separated, or a single handle. A relation must be a standard Gramps one (Birth, Adopted, Stepchild, Sponsored, Foster, Unknown, None) or a custom one the tree already uses. JSON objects accept snake_case (frel, mrel, tag_list) or camelCase (fatherRel, tagList, etc.)."
    • changedInput schema / properties / eventRefs / description
      Previous value: -"Existing family events such as Marriage or Divorce. Event references (handles, not Gramps IDs): JSON array of {ref, role}, strings \"HANDLE::Role\" (default role: Primary), comma/pipe/newline-separated, or a single handle. JSON objects accept snake_case or camelCase list fields (note_list / noteList)."New value: +"Existing family events such as Marriage or Divorce. Event references (handles, not Gramps IDs): JSON array of {ref, role}, strings \"HANDLE::Role\" (default role: Primary), comma/pipe/newline-separated, or a single handle. A role must be a standard Gramps role or a custom one the tree already uses; anything else is rejected with suggestions. JSON objects accept snake_case or camelCase list fields (note_list / noteList)."
  5. Changed10 schema fields changedv2.3.0
    • changedInput schema / properties / childRefs / description
      Previous value: -"Child links for this family. Child references: JSON array of {ref, frel, mrel}, strings \"HANDLE::RelType\" (sets both frel and mrel; default: Birth), comma/pipe/newline-separated, or a single handle. JSON objects accept snake_case (frel, mrel, tag_list) or camelCase (fatherRel, tagList, etc.)."New value: +"Children, each with its relation to the father and mother (Birth by default; Adopted, Stepchild, …). Child references (handles, not Gramps IDs): JSON array of {ref, frel, mrel}, strings \"HANDLE::RelType\" (sets both frel and mrel; default: Birth), comma/pipe/newline-separated, or a single handle. JSON objects accept snake_case (frel, mrel, tag_list) or camelCase (fatherRel, tagList, etc.)."
    • 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 / eventRefs / description
      Previous value: -"Events to link to this family. Event references: JSON array of {ref, role}, strings \"HANDLE::Role\" (default role: Primary), comma/pipe/newline-separated, or a single handle. JSON objects accept snake_case or camelCase list fields (note_list / noteList)."New value: +"Existing family events such as Marriage or Divorce. Event references (handles, not Gramps IDs): JSON array of {ref, role}, strings \"HANDLE::Role\" (default role: Primary), comma/pipe/newline-separated, or a single handle. JSON objects accept snake_case or camelCase list fields (note_list / noteList)."
    • changedInput schema / properties / fatherHandle / description
      Previous value: -"Father person handle. Optional. 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 father, optional. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects."
    • changedInput schema / properties / isPrivate / description
      Previous value: -"Mark record private (default: false)"New value: +"Mark the family private (default false)."
    • 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 / motherHandle / description
      Previous value: -"Mother person handle. Optional. 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 mother, optional. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects."
    • 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 / relationshipType / description
      Previous value: -"Relationship type: Married, Unmarried, Civil Union, Unknown (default: Married)"New value: +"Relationship type: Married (default), Unmarried, Civil Union or Unknown. 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\":\"…\"}."
  6. 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 say only non-readOnly, non-idempotent, non-destructive. The description adds substantial behavior beyond that: atomic back-linking where a missing parent/child rejects the whole family and nothing is saved, ownership of citations/notes/media/tags (family, not members), the returned handle/Gramps ID/relationship type, follow-up update_family calls with linkMode add when children/events are omitted, no duplicate detection, serialized writes, edit permission requirement, and rate-limit/locked-tree failure with a retry delay.

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 with what the tool creates, then consequences, return value, and alternatives in a logical order; almost every clause carries a distinct rule. The prose is dense and long for a single paragraph, and the closing pointer to get_reference for argument formats is somewhat buried, but there is little filler.

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?

There is no output schema, and the description compensates by stating exactly what is returned (handle, Gramps ID, stored relationship type, plus suggested update_family calls). Combined with auth, concurrency, atomicity and duplicate-handling notes, an agent has everything needed to call this 11-parameter write tool correctly.

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 semantic rules the schema does not: relationshipType stays Unknown unless a source records the marriage, eventRefs need the Family role for the family to appear among the event's participants, and childRefs ordering is preserved so children should be listed by birth. It stops short of covering the remaining parameter forms (regions, tag/note/citation lists), which the schema already handles.

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 and immediately defines the object: a couple (each parent optional), children, family events. It also explicitly separates itself from update_family (for existing families) and create_records (for several linked new records), so an agent can choose without opening another 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-to-use and when-not: use this only when people/events already exist (create_person, create_event), never for duplicates ('look at the parents' families first'), use update_family to modify, use create_records for multi-record linking, and use childRefs rather than the child's parentFamilyHandles. Alternatives are named with the condition that selects them.

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