Skip to main content
Glama

Create Repository

create_repository

Creates a new repository record for an archive, library, church, or website and returns its handle, Gramps ID, and name so sources can be linked afterward.

Instructions

Create a repository: an archive, library, church, website or other holder of sources. Returns the new handle, Gramps ID and name, with next steps. Does not check for duplicates: look through list_objects(objectType: "repositories") first so one holder is not entered twice; change an existing repository with update_repository. Link sources to it afterwards through repositoryHandles on create_source or update_source, which also carry the call number. noteHandles and tagHandles only link existing notes and tags (create_note, create_tag); nothing else is created or changed. An unknown type 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.

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_repository"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoWebsite, e.g. https://archive.example.org, stored as the repository's Web Home link (optional). For several links, another type such as E-mail, or a description, use urls instead.
nameYesName, e.g. "State Archive in Warsaw" (required).
urlsNoLinks with a type and an optional description, e.g. "Web Home: https://archive.example.org — reading room\nE-mail: info@archive.example.org". URLs: JSON array of {type,path,desc}, or strings "Web Home: https://…" with optional " — note" after URL, or lines/| separated. A type must be a standard Gramps URL type (E-mail, Web Home, Web Search, FTP, Unknown) or a custom one the tree already uses. Grammar: gramps://input-guide. Optional; not together with url.
addressNoPostal address as one line, e.g. "12 High Street, London", stored as the street of the repository's address (optional). To keep the city, postal code or country in their own fields, use addresses instead.
repoTypeNoRepository type, e.g. Archive, Library, Church, Web site (optional; Gramps stores Library when omitted). 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").
addressesNoPostal addresses with separate fields, e.g. "street: 12 High Street\ncity: London\npostal: SW1A 1AA\ncountry: United Kingdom". Addresses: JSON array of Gramps address objects; or text blocks with lines like street:, city:, … (blank line or --- between addresses); or one plain line = street only. Grammar: gramps://input-guide. Optional; not together with address.
isPrivateNoMark the repository private (default: false); Gramps Web hides private records from users not allowed to see them.
tagHandlesNoExisting tags to link (optional); create them first with create_tag. Handles, not Gramps IDs: JSON array ["h1","h2"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {"ref":"…"}.
noteHandlesNoExisting notes to link (optional); create them first with create_note. 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. Changed4 schema fields changedv2.10.0
    • changedInput schema / properties / address / description
      Previous value: -"Postal address as one line, e.g. \"12 High Street, London\", stored as the street of the repository's address (optional)."New value: +"Postal address as one line, e.g. \"12 High Street, London\", stored as the street of the repository's address (optional). To keep the city, postal code or country in their own fields, use addresses instead."
    • addedInput schema / properties / addresses
      Added value: +{
      +  "default": null,
      +  "description": "Postal addresses with separate fields, e.g. \"street: 12 High Street\\ncity: London\\npostal: SW1A 1AA\\ncountry: United Kingdom\". Addresses: JSON array of Gramps address objects; or text blocks with lines like street:, city:, … (blank line or --- between addresses); or one plain line = street only. Grammar: gramps://input-guide. Optional; not together with address."
      +}
    • changedInput schema / properties / url / description
      Previous value: -"Website, e.g. https://archive.example.org, stored as the repository's web home link (optional)."New value: +"Website, e.g. https://archive.example.org, stored as the repository's Web Home link (optional). For several links, another type such as E-mail, or a description, use urls instead."
    • addedInput schema / properties / urls
      Added value: +{
      +  "default": null,
      +  "description": "Links with a type and an optional description, e.g. \"Web Home: https://archive.example.org — reading room\\nE-mail: info@archive.example.org\". URLs: JSON array of {type,path,desc}, or strings \"Web Home: https://…\" with optional \" — note\" after URL, or lines/| separated. A type must be a standard Gramps URL type (E-mail, Web Home, Web Search, FTP, Unknown) or a custom one the tree already uses. Grammar: gramps://input-guide. Optional; not together with url."
      +}
  2. Changed7 schema fields changedv2.3.0
    • changedInput schema / properties / address / description
      Previous value: -"Street address (optional)"New value: +"Postal address as one line, e.g. \"12 High Street, London\", stored as the street of the repository's address (optional)."
    • changedInput schema / properties / isPrivate / description
      Previous value: -"Mark record private (default: false)"New value: +"Mark the repository private (default: false); Gramps Web hides private records from users not allowed to see them."
    • changedInput schema / properties / name / description
      Previous value: -"Name (required)."New value: +"Name, e.g. \"State Archive in Warsaw\" (required)."
    • 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: +"Existing notes to link (optional); create them first with create_note. 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 / repoType / description
      Previous value: -"Repository type key. Type values are validated by the server; see gramps://types resource or call get_reference(topic: \"types\") for available values."New value: +"Repository type, e.g. Archive, Library, Church, Web site (optional; Gramps stores Library when omitted). 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 (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: +"Existing tags to link (optional); create them first with create_tag. 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 / url / description
      Previous value: -"Website URL (optional)"New value: +"Website, e.g. https://archive.example.org, stored as the repository's web home link (optional)."
  3. First observedv2.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important behavior: no duplicate checking, unknown repoType rejection before save, noteHandles/tagHandles only linking existing records, write serialization, edit permission requirements, and how locked or rate-limited writes fail with a retry delay. This is rich context for a non-idempotent mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Despite covering many behaviors, the description is front-loaded with purpose and then moves through returns, duplicate handling, alternatives, linkage, validation, bulk usage, and write constraints. Every sentence carries operational information; there is no 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, so stating that it returns the new handle, Gramps ID, and name is valuable. The description also covers duplicate risk, alternatives, linking behavior, validation, authentication, and rate limiting, which is complete for a mutation tool with nine parameters.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents the nine parameters in detail. The description adds some meaning around noteHandles/tagHandles and repoType rejection, but it does not add substantial parameter syntax or constraints beyond what the schema provides.

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?

The description starts with a specific verb and resource: "Create a repository." It immediately defines what a repository is (archive, library, church, website, or other holder of sources), making the tool distinguishable from update_repository and create_records.

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 when-to-use guidance and alternatives: check list_objects first because duplicates are not checked, use update_repository for existing records, use create_records for interdependent bulk records, and use create_source/update_source to link sources afterwards. These are specific decision rules, not vague suggestions.

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