Skip to main content
Glama

Create Family

create_family

Create a family record linking a father, mother, children, and family events such as marriage. Use it to add a couple with relationship type and child references after those people and events exist.

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").

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. 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.
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. 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\")."
  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. 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)."
  4. 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\":\"…\"}."
  5. First observedv2.2.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations it discloses the atomicity rule (a missing member makes Gramps Web refuse the family and save nothing), the no-duplicate-check behaviour, write serialization, the edit-permission requirement, and rate-limit/lock failures with the wait before retrying. It also describes the return value and the follow-up update_family calls with linkMode add when refs were omitted.

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 the core creation model and every sentence carries information, but it is delivered as one dense block with long compound sentences, which makes it harder to scan than a short set of grouped points. No filler sentences are present.

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, all-optional mutation tool with no output schema, it covers prerequisites, atomicity, permissions, concurrency, duplicate policy, relationship-type conventions, return shape, and a pointer to get_reference for argument formats. An agent has what it needs to call it correctly and to recover from a refusal.

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?

Although schema coverage is 100%, the description adds real semantics the schema does not: relationshipType stays Unknown unless a source records the marriage, the Family role in eventRefs is what makes the family appear among the event's participants, childRefs order is preserved so children should be listed by birth, and citations/notes/tags belong to the family and not its members. The plain handle-list parameters are left to the schema, which is appropriate.

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 plus the shape of the record: "Create a family: a couple (father and mother, each optional) with their relationship type, children and family events." It also distinguishes itself from siblings by naming create_records and update_family and the conditions that select them.

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?

It gives explicit routing rules: look at the parents' families first because duplicates are not checked, use update_family to change an existing family, use create_records for several new interlinked records, and add children via childRefs rather than parentFamilyHandles. Each alternative comes with the condition that selects it.

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