lorehub-mcp

v0.8.0
lorehub-mcp Checked 3 days ago Published 2 days ago

MCP server that lets AI agents read and edit a LoreHub world: dialogues, lore, timeline, story map, translations, gallery images, exports and stats

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

get_dialogue

Get a dialogue as a script, in one API call: its story, start node and nodes in reading order. Each node has its short id (node_03), speaker, lines, options (text, conditions, target node), next links with conditions, variables it sets, meta values and the Meta Areas it is in. A link with entry "options" returns to its target's options without repeating the target's lines. Also the variables and characters the dialogue uses.

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

get_dialogue_meta

Get the Meta Areas of one dialogue: what the director marked on the canvas, ready to hand to a reference- generating agent. Each area has its title, note, priority (higher wins where areas overlap), its meta rules as field name -> value, and the nodes inside it with their speaker and lines. Areas are in canvas reading order.

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
areaOnly areas whose title contains this text (case-insensitive), or an area id. Omit for all areas.
include_nodesbooleanList the nodes inside each area (id, speaker, lines) and the nodes where areas overlap.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

search_world

Search a world's documents and dialogues: document names, document Content and field values (text, rich text, number and choice fields), dialogue names, dialogue lines and option texts. Each hit has its kind (document, document-content, document-field, dialogue, line, option), id, name and a snippet; document-content and document-field hits name the field in `field`, and lines and options have the dialogue id and node. Open a document with get_document for all of its text.

ParameterTypeDescription
query *stringText to find, at least 2 characters. Case-insensitive.
limitintegerHits to return, 1 to 50.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

get_document

Get a world document as text, in one API call: name, parent, tags, the template it follows (like Character), its content (the main text) as Markdown-like text, its other field values (key, label, type, readable value, unit, and locked when its template fixes the value; links to documents with their ids, images with their id), its relations to other documents (each with its pair id, note and value) and the dialogues that mention it (with how often). description is the same text as content, for older clients.

ParameterTypeDescription
document_id *stringDocument id, a GUID: a character, place or any other world document.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

get_character_lines

Get every line of a story grouped by speaker, in one API call: each speaker's name, document id, line and word counts, and their lines with the dialogue, node, the line before it and the node's meta values. Lines without a speaker are under "(no speaker)". Also the story's totals. For voice casting and recording scripts.

ParameterTypeDescription
game_id *stringStory (game) id, a GUID.
speaker_document_idA character's document id, to get only their lines. Omit for every speaker.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

check_dialogue

Check a dialogue for problems, in two API calls: nodes not reachable from the start, options without a target, nodes where the dialogue ends, variables set but never checked or checked but never set (within this dialogue), and a summary of the story's route map link checks.

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

list_worlds

List the LoreHub worlds this server is set up for (each has its own API key), with their ids and which one is current. Tools use the current world when world_id is omitted; switch it with use_world.

use_world

Make another configured world the current one for this session, so the other tools use it when world_id is omitted. It doesn't change the saved current world (`lorehub-mcp world use` does).

ParameterTypeDescription
world *stringThe world's name or id, as list_worlds shows it.

list_dialogues

Find a dialogue's id by story and name, to pass to get_dialogue and get_dialogue_meta.

ParameterTypeDescription
game_idStory (game) id. Omit to list the dialogues of every story in the world.
nameOnly dialogues whose name contains this text (case-insensitive).
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

get_world_overview

Get the world's canon map in two API calls: its stories with their dialogue counts, its documents grouped by folder (a document with documents under it) and by tag, the top-level documents, its document templates (the kinds of document, like Character or Location, with their fields), and counts of stories, dialogues, documents, tags and timeline events. Start here to find your way around a world.

ParameterTypeDescription
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

list_documents

List a world's documents (characters, places, items, factions, any lore) in one API call (two with a template name), with their id, parent, tags and template, filtered by tag, folder, name or template. more is true when there are more than the limit. Read one with get_document.

ParameterTypeDescription
limitintegerDocuments to return, 1 to 200.
nameOnly documents whose name contains this text (case-insensitive).
parent_idOnly documents directly under this document (a folder), a GUID.
tagOnly documents with this tag (case-insensitive).
templateOnly documents that follow this template: its name (any case) or id. "Document" is the built-in template of documents without one.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

list_document_templates

Get the world's document templates and fields in one API call, before creating or editing documents with fields. Each template (like Character or Location; "Document" is the built-in one documents without a template follow) has its layout and its fields in page order: key, label, column, group and locked_value (the value every document of the template has and can't change). Each field has its key, label, type (text, richText, number, boolean, choice, documentLink, documentList, image), options (choice), unit (number) and where a document list picks from. Content is the buil…

ParameterTypeDescription
templateOnly this template: its name (any case) or id. Omit for every template.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

get_timeline

Get the world's timeline in one API call: its calendar (start and end year, months with their days) and its events in date order. An event is instant (one date) or lasting (start and end), with a readable date like "12 Frostmoon 1204" and the documents linked to it. calendar is null when the world has no timeline.

ParameterTypeDescription
from_yearOnly events that end in or after this year.
to_yearOnly events that start in or before this year.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

get_story_map

Get a story's structure in one API call: its route map (dialogues with the variables each requires and produces, links between dialogues with their check: ok, partial, conflict or carried, and why), its route scopes (acts and chapters as a tree with their dialogues and links), and every variable of the story with the dialogues and nodes that set it and check it. For narrative designers and programmers.

ParameterTypeDescription
game_id *stringStory (game) id, a GUID.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

get_translations

Get a dialogue's translations in one API call: the source language, each target language with its policy (enforced or fallback) and progress, and each line and option with its key (node_03.content.0), speaker, source text and, per language, the translation and its status: translated, outdated (the source changed since), missing (enforced) or fallback (the source shows).

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
game_id *stringStory (game) id, a GUID.
languageOnly this language code, like de or pt-BR. Omit for every language of the story.
only_untranslatedbooleanOnly rows with a language that is not translated against the current source line.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

get_export

Get a dialogue's Export Schema v2 JSON in one API call, the same file the Export button gives, to load into a game engine (Unity, Godot, Unreal) or your own runtime. It does not record an export in LoreHub. Schema docs: https://lorehub.app/documentation. The resources list holds the dialogue, variables, documents, meta schema, nodes, options, content blocks and links.

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
game_id *stringStory (game) id, a GUID.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

get_world_stats

Get counts for planning and budgets in one API call: per story its dialogues, nodes, lines, options and words, lines and words per character (for voice recording), and translation progress per language; plus the world's totals. For producers and localisation leads.

ParameterTypeDescription
game_idOnly this story (game) id. Omit for every story in the world.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

create_dialogue

Create a named dialogue in a story, in one API call. Returns its id. Add nodes with add_node.

ParameterTypeDescription
game_id *stringStory (game) id, a GUID.
name *stringThe new dialogue's name.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

rename_dialogue

Rename a dialogue, in one API call.

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
name *stringThe new name.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

add_node

Add a node to a dialogue, optionally after another node and with a speaker and lines. One API call for the node, plus one to read the content and one or two per speaker and line.

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
x *integerCanvas x of the new node.
y *integerCanvas y of the new node.
after_node_idA node GUID to link from, so the new node follows it.
linesThe node's lines, in order.
speaker_document_idThe speaking character's document GUID.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

edit_node

Change a node's speaker and lines in place. Only lines that differ are written (one API call each, plus one to read the content); new lines are added after the others. It never removes a line, and it refuses a shorter list: removing is done in LoreHub. Use set_node_meta for meta values.

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
node_id *stringNode GUID: node_id from get_dialogue, not the short id like node_03.
linesAll of the node's lines in order, changed where you want; extra lines are added at the end. Send at least as many as it has.
speaker_document_idThe speaking character's document GUID.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

move_node

Move a node on the canvas, in one API call. A move can change which Meta Areas the node is in.

ParameterTypeDescription
node_id *stringNode GUID: node_id from get_dialogue, not the short id like node_03.
x *integer
y *integer
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

set_node_meta

Set meta values on a node by field name. Two API calls to read the story's meta fields and the node's values, then one per value (two for a field the node has no value for yet). Other fields are left alone.

ParameterTypeDescription
game_id *stringStory (game) id, a GUID.
node_id *stringNode GUID: node_id from get_dialogue, not the short id like node_03.
values *objectMeta field name -> value, like {"shot": "close_up"}. A field of a predefined list (textList, integerList) takes one of its options. Fields not listed are left as they are.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

add_option

Add an option to a node, in two API calls, plus one to read the variables and one per condition. Link it to a node with link_nodes(from_option_id=...).

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
game_id *stringStory (game) id, a GUID.
node_id *stringNode GUID: node_id from get_dialogue, not the short id like node_03.
text *stringWhat the player can choose.
conditionsShow the option only when these variables have these values.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

edit_option

Change an option's text, in one API call.

ParameterTypeDescription
node_id *stringNode GUID: node_id from get_dialogue, not the short id like node_03.
option_id *stringOption GUID: option_id from get_dialogue.
text *stringThe option's new text.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

create_variable

Create a story variable (true or false), in one API call.

ParameterTypeDescription
game_id *stringStory (game) id, a GUID.
name *stringLower case letters, digits and underscores, like has_key.
commentstringWhat it tracks, for the writers.
defaultbooleanIts value when the story starts.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

set_variable_on_node

Make a node set a variable when it plays, in two API calls (the story's variables, then the set).

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
game_id *stringStory (game) id, a GUID.
node_id *stringNode GUID: node_id from get_dialogue, not the short id like node_03.
variable *stringThe story variable's name.
valuebooleanThe value the node sets when it plays.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

create_document

Create a world document, in one API call, plus one to read the templates and fields (with template or fields), one for the parent, one to put it on the template, one for its content and field values together, and one to read the tags and one or two per tag. The template's locked values are applied first; fields it locks can't be sent.

ParameterTypeDescription
name *stringThe document's name, like a character or place.
contentThe document's main text (its Content), in simple Markdown: # headings, paragraphs, - lists, **bold**, *italic*.
descriptionDeprecated: the older name of content.
fieldsField key or label (any case) -> value, as list_document_templates shows them: text and number as text, boolean true or false, choice one of its options, rich text in simple Markdown, documentLink a d…
parent_idA document GUID to put it under, like a Characters folder.
tagsTag names; missing tags are created.
templateA template (kind of document) to follow, like Character: its name (any case) or id, from list_document_templates. Its locked values are applied.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

edit_document

Change a document's name, content, template, field values, parent or tags. One API call each for the name, parent and template, one for the content and fields together, plus one to read the templates and fields (with template or fields), one to read the document (fields without template, to know what its template locks), and for tags one to read, then one or two each. Only what you send changes; values and tags are never removed.

ParameterTypeDescription
document_id *stringDocument GUID.
add_tagsTag names to add; missing tags are created. Tags are never removed.
contentNew main text (Content) in simple Markdown. It replaces the whole text: read it with get_document first and send it all.
descriptionDeprecated: the older name of content.
fieldsField key or label (any case) -> value, as list_document_templates shows them: text and number as text, boolean true or false, choice one of its options, rich text in simple Markdown, documentLink a d…
nameA new name.
parent_idA document GUID to move it under.
templateA template to put the document on (name or id): its locked values replace the document's. Taking a document off its template is done in LoreHub.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

relate_documents

Relate two documents by one of the world's relation types, in two API calls (the relation types, then the pair). For Father / Son, relation="Son" makes related_document_id the son of document_id. A note and a value are optional; a value only works for a relation type that has one.

ParameterTypeDescription
document_id *stringDocument GUID.
related_document_id *stringDocument GUID.
relation *stringThe relation side the related document plays for document_id, like Son in Father / Son.
noteA short note on the relation, like 'Since the duel at Thornwall'.
valueHow strong the relation is, -100 to 100, for relation types that have a value.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

create_relation_type

Create a relation type for relate_documents, in two API calls (the relation types, to refuse a name the world already has, then the type). Which templates each side allows is set in LoreHub.

ParameterTypeDescription
name *stringSide A's name, like Father in Father / Son, or the one name of a mutual type, like Friend.
colourstringIts colour in LoreHub.
has_valuebooleanWhether its relations carry a value from -100 to 100, like trust or rivalry.
other_sideSide B's name, like Son. Leave out for a mutual type.
shapestringdirected: A to B with two names. mutual: one name, the same both ways. hierarchy: A is the parent of B, with no loops.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

edit_relation

Change a relation's type or direction, note or value, in two or three API calls (the relation, the relation types when relation is sent, then the change). Only what you send changes. Removing a relation or its note is done in LoreHub.

ParameterTypeDescription
document_id *stringDocument GUID.
pair_id *stringThe relation's pair_id, from get_document's relations.
noteA new note. It replaces the old one.
relationA new relation side the other document plays for document_id, like Son. The other side name of the same type flips the relation.
valueHow strong the relation is, -100 to 100, for relation types that have a value.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

add_meta_area

Draw a Meta Area on a dialogue's canvas, in one API call, plus two for rules.

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
height *integer
title *stringLike "Close-up: Tom is crying".
width *integer
x *integer
y *integer
colorstringA CSS colour like #f00.
game_idThe story GUID. Needed with rules.
notestring
rulesMeta field name -> value the nodes inside get, like {"shot": "close_up"}.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

edit_meta_area

Change a Meta Area: one API call to read it, then one each for its text (title, note, colour, priority), its place and size, and its rules (plus one to read the meta fields). Only what you send changes; rules are merged, never removed.

ParameterTypeDescription
area_id *stringThe area's id from get_dialogue_meta.
dialogue_id *stringDialogue id, a GUID.
color
game_idThe story GUID. Needed with rules.
height
note
priorityHigher wins where areas overlap.
rulesMeta field name -> value to set. Rules not listed stay.
title
width
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).
x
y

set_translation

Write a line's translation in one language, in one API call. It replaces the current translation.

ParameterTypeDescription
language *stringThe target language code, like de or pt-BR.
line_id *stringThe line or option GUID: lineId from get_translations.
text *stringThe translation.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

get_storyboard

Get a dialogue's Storyboard, in 3 API calls (4 with nodes): its cards in the order LoreHub shows them, each a Meta Area with its number (an area inside another card is a shot of it, 1.1), title, note, reference image and nodes; the dialogue's other Meta Areas, which are not cards; the gallery folder the Storyboard picks images from; and the world's gallery folders and the images in that folder, to choose from with set_storyboard_folder and set_storyboard_card. For an area's meta rules use get_dialogue_meta.

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
include_nodesbooleanList each card's nodes (id, speaker, lines). One more API call.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

set_storyboard_folder

Choose the gallery folder a dialogue's Storyboard picks its reference images from, in 2 API calls (1 with a folder id). It replaces the current folder; cards keep the images they have. Folders are made in LoreHub.

ParameterTypeDescription
dialogue_id *stringDialogue id, a GUID.
folder *stringThe gallery folder's name or id, from get_storyboard.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

set_storyboard_card

Make a Meta Area a Storyboard card (or take it out) and set its reference image, in 2–4 API calls: one to read the Storyboard, one to find an area by title, one to find an image by name, and one to save. An image replaces the card's current one; without one the card keeps its image. To take an image off a card, do it in LoreHub.

ParameterTypeDescription
area *stringThe Meta Area's id, or text in its title, from get_storyboard or get_dialogue_meta.
dialogue_id *stringDialogue id, a GUID.
imageThe reference image's name or id, from the gallery in get_storyboard. Omit to keep the card's image.
includedbooleanWhether the area is a card in the Storyboard. False takes the card out but keeps its image.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

list_images

The world's gallery images by name: folder, file type, size, upload date and how many places use each. One API call, two with a folder name.

ParameterTypeDescription
folderOnly this folder's images: its name or GUID.
nameOnly images whose name contains this (any case).
unusedbooleanOnly images nothing uses: no document link, Image field, rich text or Storyboard card.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

list_image_folders

The world's gallery folders with how many images each has. One API call.

ParameterTypeDescription
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

get_image

One image: its folder, size and upload date, the documents it is linked to and every place that uses it (Image fields, rich text, Storyboard cards), with a small preview attached so you can see it. Two API calls (three with a name, one more with include_original).

ParameterTypeDescription
image *stringThe image: its GUID from list_images, or its exact name (any case).
include_originalbooleanAlso attach the full-size file, when it is a PNG, JPG, GIF or WebP of at most 5 MB. Costs one more API call and much more context: the preview is usually enough.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

upload_image

Uploads an image from this computer into a gallery folder, within the world's plan storage. Needs a Write key of an Artist or more. One API call, two with a folder name.

ParameterTypeDescription
file_path *stringPath of an image file on this computer: PNG, JPG, GIF, WebP, AVIF or BMP, at most 28 MB.
folder *stringA gallery folder: its GUID from list_image_folders, or its name (any case).
nameThe image's name in LoreHub. Omit to use the file name without its extension.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

rename_image

Renames a gallery image. Every place that shows it keeps showing it. One API call (two with a name).

ParameterTypeDescription
image *stringThe image: its GUID from list_images, or its exact name (any case).
name *stringThe new name.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

move_image

Moves a gallery image to another folder. Every place that shows it keeps showing it. One API call, plus one each for an image or folder given by name.

ParameterTypeDescription
folder *stringA gallery folder: its GUID from list_image_folders, or its name (any case).
image *stringThe image: its GUID from list_images, or its exact name (any case).
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

create_image_folder

Creates a gallery folder. One API call.

ParameterTypeDescription
name *stringThe folder's name; the world can't have two with the same name.
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).

set_image_field

Shows a gallery image in a document's Image field, like a character's portrait, replacing the image there. Changing document values needs a Write key of a Writer or more. Two API calls (three with an image name).

ParameterTypeDescription
document_id *stringDocument GUID.
field *stringThe document's Image field: its key or label (any case), like portrait.
image *stringThe image: its GUID from list_images, or its exact name (any case).
world_idLoreHub world (setting) id, a GUID. Omit for the current world (see list_worlds).