Skip to main content
Glama

Create Source

create_source

Create a source record for a book, register, archive unit, or website so genealogy facts can be cited; include title, author, publication details, and holding repositories.

Instructions

Create a source: a book, register, archive unit or website that facts come from, with title, author, publication info and the repositories that hold it. Search for the source first: no duplicate check is made, and an existing source is changed with update_source. repositoryHandles takes existing repositories only (create_repository), each with the source's call number there. The arguments split a reference: title names the document, such as a parish register for one year; author is who made it; pubinfo is for a published work; abbrev is a short title for lists; the archive's shelf mark, such as fond, inventory and file, is the call number on repositoryHandles, with the media type (Book, Manuscript, Film, Electronic …) the archive holds it in; the page, frame or entry goes on the citation. Notes and media here describe the whole source; the scan of one entry belongs on its citation. A source alone proves nothing: cite a page or act of it with create_citation, then attach that citation to people and events. Returns the new handle, Gramps ID and title, with next steps. 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": {
      "title": "<title>"
    },
    "name": "create_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
titleYesTitle (required).
abbrevNoShort title for lists (optional).
authorNoAuthor or issuing body (optional).
pubinfoNoPublication info: publisher, place, year (optional).
isPrivateNoMark the source 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. Each attribute takes only type, value and private.
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.
repositoryHandlesNoRepositories that hold the source, each with an optional call number and media type; the repositories must exist (create_repository). Repository refs (handles, not Gramps IDs): JSON array of GrampsRepositoryRef objects, or strings "Ref : CallNumber : MediaType". JSON objects accept Gramps snake_case (call_number, media_type) or camelCase (callNumber, mediaType). Parts after Ref are optional: "Ref : CallNumber" and "Ref :: MediaType" are valid. MediaType must be a standard Gramps source media type (Book, Manuscript, Film, Photo, …) or a custom one the tree already uses. Multiple refs: JSON array or one multiline / |-separated string.

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. Changed2 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. Each attribute takes only type, value and private."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. Each attribute takes only type, value and private."
    • changedInput schema / properties / repositoryHandles / description
      Previous value: -"Repositories that hold the source, each with an optional call number and media type; the repositories must exist (create_repository). Repository refs (handles, not Gramps IDs): JSON array of GrampsRepositoryRef objects, or strings \"Ref : CallNumber : MediaType\". JSON objects accept Gramps snake_case (call_number, media_type) or camelCase (callNumber, mediaType). Parts after Ref are optional: \"Ref : CallNumber\" and \"Ref :: MediaType\" are valid. Multiple refs: JSON array or one multiline / |-separated string."New value: +"Repositories that hold the source, each with an optional call number and media type; the repositories must exist (create_repository). Repository refs (handles, not Gramps IDs): JSON array of GrampsRepositoryRef objects, or strings \"Ref : CallNumber : MediaType\". JSON objects accept Gramps snake_case (call_number, media_type) or camelCase (callNumber, mediaType). Parts after Ref are optional: \"Ref : CallNumber\" and \"Ref :: MediaType\" are valid. MediaType must be a standard Gramps source media type (Book, Manuscript, Film, Photo, …) or a custom one the tree already uses. Multiple refs: JSON array or one multiline / |-separated string."
  4. Changed1 schema field changedv2.3.1
    • 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. Full grammar: gramps://input-guide. Each attribute takes only type, value and private."
  5. Changed8 schema fields changedv2.3.0
    • changedInput schema / properties / abbrev / description
      Previous value: -"Abbreviation (optional)"New value: +"Short title for lists (optional)."
    • changedInput schema / properties / author / description
      Previous value: -"Author name (optional)"New value: +"Author or issuing body (optional)."
    • changedInput schema / properties / isPrivate / description
      Previous value: -"Mark record private (default: false)"New value: +"Mark the source private (default false)."
    • changedInput schema / properties / mediaHandles / description
      Previous value: -"Media handles (optional). 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 / noteHandles / description
      Previous value: -"Note handles (optional). 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 / pubinfo / description
      Previous value: -"Publication info (optional)"New value: +"Publication info: publisher, place, year (optional)."
    • changedInput schema / properties / repositoryHandles / description
      Previous value: -"Repository refs. Repository refs: JSON array of GrampsRepositoryRef objects, or strings \"Ref : CallNumber : MediaType\". JSON objects accept Gramps snake_case (call_number, media_type) or camelCase (callNumber, mediaType). Parts after Ref are optional: \"Ref : CallNumber\" and \"Ref :: MediaType\" are valid. Multiple refs: JSON array or one multiline / |-separated string."New value: +"Repositories that hold the source, each with an optional call number and media type; the repositories must exist (create_repository). Repository refs (handles, not Gramps IDs): JSON array of GrampsRepositoryRef objects, or strings \"Ref : CallNumber : MediaType\". JSON objects accept Gramps snake_case (call_number, media_type) or camelCase (callNumber, mediaType). Parts after Ref are optional: \"Ref : CallNumber\" and \"Ref :: MediaType\" are valid. Multiple refs: JSON array or one multiline / |-separated string."
    • changedInput schema / properties / tagHandles / description
      Previous value: -"Tag handles (optional). 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 only declare the write profile (readOnly=false, destructive=false, idempotent=false); the description adds real behavioral context on top: no duplicate detection, single-threaded writes, an edit-capable Gramps Web account required, and locked/rate-limited writes failing with a retry delay. It also states the return payload (handle, Gramps ID, title, next steps), which annotations do not cover.

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 definition and the search-first warning, then moves through argument semantics, relationships, transaction alternative, and operational constraints in a sensible order. It is dense and near the limit of a single block, with minor redundancy between the notes/media sentence and the earlier citation guidance, but almost every sentence carries actionable information.

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 10-parameter tool with many cross-entity handles and no output schema, the description supplies the missing pieces: where each argument comes from, why to prefer create_records for linked creations, what is returned, and what failure modes to expect. Little an agent needs to call this correctly is left unstated.

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 a 3 is the floor, but the description earns more by explaining the conceptual split of a bibliographic reference — title names the document, author is who made it, pubinfo only for published works, abbrev for lists, and the shelf mark belongs on repositoryHandles rather than the title. It leaves isPrivate, attributes, tags and notes largely to the schema and the get_reference pointer, which keeps it from a 5.

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 plus resource ("Create a source") and then defines what a source is — book, register, archive unit or website with title, author, publication info, and holding repositories. It actively distinguishes itself from update_source (editing existing) and create_citation (citing a page), so an agent can route correctly 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-to-use-something-else guidance: search first because no duplicate check is made, use update_source for existing sources, use create_repository for missing repositories, use create_citation because a source alone proves nothing, and use create_records for several interlinked new records. Exclusions and prerequisites are stated rather than inferred.

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