Create Repository
create_repositoryCreates 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
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | 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. | |
| name | Yes | Name, e.g. "State Archive in Warsaw" (required). | |
| urls | No | 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. | |
| address | No | 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. | |
| repoType | No | 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"). | |
| addresses | No | 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. | |
| isPrivate | No | Mark the repository private (default: false); Gramps Web hides private records from users not allowed to see them. | |
| tagHandles | No | 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":"…"}. | |
| noteHandles | No | 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":"…"}. |