{"mcp_version":"2025-03-26","server":{"name":"Archivist AI","version":"2.2.0","description":"Read\/write access to Archivist AI TTRPG campaign data: campaigns, characters, sessions, beats, moments, factions, locations, items, quests, journals, journal folders, entity links, and entity images. Archivist AI is a campaign memory platform for tabletop RPG game masters and players.\n\n## Wikilinks (IMPORTANT for write tools)\n\nTextual references between records use `[[Target Name|Optional Alias]]` markup. The API's handling of wikilinks depends on the record type, and getting this wrong on a write will silently destroy existing links. Before editing any text field that carries wikilinks, always:\n\n1. **Read first with `with_links: true`** \u2014 every Get\/List tool for Character, Faction, Location, Item, Moment, Beat, Session, and Journal now accepts this parameter (default false to preserve legacy behavior). Without it, stored text comes back with wikilinks stripped, so a naive round-trip write erases every link on the source record.\n\n2. **Preserve existing markup** \u2014 leave `[[Alice|Al]]` intact unless you intend to change the alias\/target. To rename an alias, edit inside the brackets. To repoint at a different entity, change the visible target name (`[[Alice]]` \u2192 `[[Alicia]]`). To remove, unbracket.\n\n3. **Understand the per-type contract**:\n   - **Compendium entities (Character\/Faction\/Location\/Item + Character.backstory)** \u2014 Auto-resolve: the API extracts `[[\u2026]]` from the new text, matches each against entities in the same campaign, and syncs Link rows (inserts\/updates\/deletes) so the Link table matches the text. New `[[Alias]]` markup for a matchable entity creates a Link automatically. **Important:** on write, the API deletes existing Link rows from this entity when their `alias` no longer appears wrapped in the text \u2014 even if those links existed before your edit.\n   - **Sessions, Beats, Moments** \u2014 Explicit-link only: new `[[Alias]]` markup in `summary`\/`description`\/`content` is **stripped unless a matching Link already exists** for that source. To add a wikilink, first call `create_link` with the correct `from_type`\/`from_id`, then update the text with `[[Alias]]`.\n   - **Journals** \u2014 Rendering-only: `[[\u2026]]` in stored content is honored on read with `with_links: true`, but writes do not auto-populate the Link table. Use `create_link` (from_type=Journal) if you want persistent link tracking.\n   - **Deletes** \u2014 When you delete a Character\/Faction\/Location\/Item\/Moment, the API automatically unbrackets all `[[alias]]` references to it across every referring record. No manual cleanup is required.\n\n4. **When updating compendium text (description \/ backstory)** \u2014 use this order every time:\n   1. Fetch the entity with `with_links: true`.\n   2. Call `list_links` with `from_id` = the entity's id and `from_type` = `Character`, `Faction`, `Location`, or `Item`. Store every returned `alias` in memory.\n   3. Draft or rewrite the prose.\n   4. Re-wrap each stored link `alias` as `[[alias]]` anywhere that alias still appears in the new text (use `[[Target Name|alias]]` only when that link intentionally used a different display label).\n   5. **Discovery pass:** for other proper nouns \/ entity references in the draft, call `list_characters`, `list_factions`, `list_locations`, and\/or `list_items` with the `search` parameter \u2014 one call per candidate name. Read only `character_name` or `name` (and `aliases` when present) from matches; do not ingest full `description` bodies unless you need detail. Paginate only when search is inconclusive \u2014 there is no separate \"names only\" endpoint.\n   6. Wrap confirmed matches per the **Wikilink markup format** rules below. Compendium writes auto-create Link rows \u2014 no `create_link` call needed for Character\/Faction\/Location\/Item targets.\n   7. Write with the matching update tool.\n\n5. **When creating compendium records from scratch** \u2014 after drafting text, run the discovery pass (steps 5\u20136 above) before the create call, then include all resolved `[[wikilinks]]` in the initial payload.\n\n6. **Wikilink markup format (do not get this wrong)**:\n   - In `[[Target Name|Alias]]`, the **left** side is used only to resolve the entity; the **right** side becomes `Link.alias`. If there is no pipe, both sides are the same string and that string is the alias.\n   - The UI builds a link map keyed by `Link.alias`. Bracket text must match that alias exactly or the link will not render \u2014 even when a Link row looks correct in the database.\n   - **Default:** when prose uses an entity's full name, write `[[Exact Name From API]]` with **no pipe**. Copy `character_name` or `name` byte-for-byte from `list_*` results; do not copy typography from surrounding prose (e.g. do not substitute curly apostrophes for straight ones).\n   - **Pipe only when the visible label differs from the entity name**, e.g. `[[Queen Whatsherface|the queen]]` where the prose says \"the queen\".\n   - **Never** write `[[Name|Name]]`, never put the \"canonical\" name on the left and a prose variant on the right for the same entity, and never mix look-alike characters (straight `'` vs curly `'`, etc.) across the pipe.\n   - When re-wrapping aliases from `list_links`, the string inside `[[\u2026]]` must match the stored `alias` field exactly.\n\n## Images\n\nEntity images (Character, Faction, Location, Item, Moment, Session, Campaign\/World) are added by direct upload:\n\n- **Direct upload** \u2014 Two-step flow. Call `init_image_upload` to receive a presigned S3 PUT URL (`upload_url`), then have your client `PUT` the raw image bytes to that URL with the same `Content-Type` header. Once the PUT succeeds, call `complete_image_upload` (with the returned `object_key`) to run NSFW moderation and, when `attach: true`, set the entity's `image` field to the moderated `public_url`. If your agent cannot perform arbitrary HTTP PUTs, hand off the PUT to a human collaborator between the two tools.\n- **Quota** \u2014 `get_image_usage` reports the account's image feature quota for a campaign (`used`\/`limit`, `tier`, `can_access`, cycle window).\n\nUse `delete_entity_image` to detach and clean up either by `entity_type` + `entity_id` (detaches AND deletes the object) or by managed `image_url` (deletes just the object).\n\n## Excluded operations\n\nCampaign delete, session create\/delete, product-view-only operations (beat reorder\/batch-edit, campaign settings, cast\/member management), and multipart recording uploads are intentionally not exposed as MCP tools in this version.\n\nAI image generation is also not exposed. Entity art can be uploaded and attached (see Images above), but there is no tool that generates it \u2014 that stays in the Archivist AI app. Do not tell the user you can generate campaign art; direct them to the app instead."},"endpoints":[{"url":"https:\/\/mcp.myarchivist.ai\/mcp","transport":"streamable-http"}],"authentication":{"required":true,"schemes":["oauth2","bearer"]},"documentation":"https:\/\/developers.myarchivist.ai","server_card":"https:\/\/mcp.myarchivist.ai\/.well-known\/mcp\/server-card.json"}