Skip to main content
Glama

Create Repository

create_repository

Create a repository record for an archive, library, church, website, or other source holder and return its handle, Gramps ID, and name. Check list_objects for 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.

Input Schema

TableJSON 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.7/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnlyHint=false, destructiveHint=false), and the description adds substantial behavior beyond that: no duplicate checking, unknown repoType rejected before anything is saved, noteHandles/tagHandles merely link existing records ('nothing else is created or changed'), and the exact return payload (handle, Gramps ID, name). That is well past the lowered bar set by the annotations.

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?

Four dense sentences, front-loaded with purpose and return value, then guarding constraints. Semicolons carry the subordinate details (duplicate risk, handle-only linking, validation) without filler, and no sentence is expendable.

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 mutation tool with no output schema, the description still supplies the return shape, the duplicate-detection limitation, the validation failure mode, and the downstream linking workflow. Nothing an agent needs to invoke it correctly is missing, and no output-schema explanation is owed.

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 every parameter is already documented with examples and defaults; the description's parameter content (type validation, handle-only linking) largely restates that. The only marginal addition is that create_source/update_source 'carry the call number' when linking, which concerns a sibling tool rather than this one's inputs.

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 ('Create a repository') and immediately defines what a repository is ('an archive, library, church, website or other holder of sources'). It also names the create/update pair explicitly ('change an existing repository with update_repository'), so an agent can separate it from siblings like update_repository, create_source, or create_tag without opening a 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-to-use instructions: check list_objects(objectType: "repositories") first because duplicates are not detected, use update_repository for existing holders, and attach sources afterwards via repositoryHandles on create_source/update_source. Alternative tools are named by name, not implied.

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