Skip to main content
Glama

Create Repository

create_repository

Create a repository such as an archive, library, church, or website in Gramps Web, returning its handle, Gramps ID, and name. Check existing repositories first to avoid duplicates.

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.

Input Schema

NameRequiredDescriptionDefault
urlNoWebsite, e.g. https://archive.example.org, stored as the repository's web home link (optional).
nameYesName, e.g. "State Archive in Warsaw" (required).
addressNoPostal address as one line, e.g. "12 High Street, London", stored as the street of the repository's address (optional).
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").
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. 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)."
  2. First observedv2.2.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations (which only declare non-readonly, non-destructive, non-idempotent, closed-world): it discloses the absence of duplicate checking, that an unknown type is rejected before any write, that noteHandles/tagHandles link only existing objects and create nothing, serialized writes, required edit permission, and lock/rate-limit failure behavior including 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?

Purpose and return values are front-loaded, with constraints and alternatives following in a logical order. It is a dense single block covering a lot of ground, and a few clauses (e.g., restating that nothing else is created or changed) could be trimmed, but almost every sentence carries actionable content.

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?

With no output schema, the description supplies the return shape (handle, Gramps ID, name) plus next steps. For a 7-parameter mutation tool it also covers permissions, error/rejection behavior, rate limiting, and non-atomicity relative to create_records, leaving no material gap for correct invocation.

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 schema already carries parameter meaning, but the description adds cross-tool semantics the schema cannot: where the call number lives (repositoryHandles on create_source/update_source) and that notes and tags must already exist. It also points at get_reference(topic: "types") for valid repoType values, adding a discovery path beyond the schema.

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 a definition of the domain object ('an archive, library, church, website or other holder of sources'), which disambiguates it from create_source, create_note, and create_records. It also states what is returned, so the agent knows the outcome shape without opening anything else.

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?

Explicit routing: check list_objects(objectType: "repositories") first to avoid duplicates, use update_repository for existing records, use create_records for multi-record batches, and link sources afterwards via repositoryHandles on create_source/update_source. Both when-to-use and when-not-to-use are named with concrete alternatives.

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