narrarium-mcp-server

v0.1.59
narrarium-mcp-server Checked 56 minutes ago Published 10 days ago

Local MCP server for Narrarium book repositories.

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

init_book_repo

Create the local Narrarium repository structure for a book project, including folders, guidelines, summaries, evaluations, and reusable skills.

ParameterTypeDescription
rootPath *string
title *string
authorstring
createSkillsboolean
languagestring

setup_framework

Return the exact npx commands and setup steps to bootstrap a new Narrarium project from scratch, or to upgrade an existing book repo. Use this tool when the user asks how to set up the framework, how to upgrade, or how to install Narrarium. ## Creating a new book Run from any empty folder: ``` npx create-narrarium-book . --title "My Book" --language en --author "Author Name" ``` Answer **y** when npx asks to install the package. Add `--with-reader` to also scaffold the Astro reader site. ## Upgrading an existing book repo Run from the **book root** (the folder that contains `book.md`): ```…

ParameterTypeDescription
languagestring
projectNamestring
readerDirstring
sampleboolean
titlestring
upgradeboolean
withReaderboolean

repository_spec

Return the Narrarium repository model and canon rules so clients can understand the book framework structure.

start_wizard

Start a multi-step guided wizard session for creating canon files or chapter structures. Use this when the user has not provided all required details yet.

ParameterTypeDescription
kind *string
rootPath *string
seedobject

wizard_answer

Answer the current prompt in a running wizard session and receive the next guided question.

ParameterTypeDescription
sessionId *string
answer
skipboolean

wizard_status

Inspect the current state of a wizard session, including collected fields and the next question.

ParameterTypeDescription
sessionId *string

wizard_finalize

Finalize a wizard session and write the corresponding file or folder into the local book repository.

ParameterTypeDescription
sessionId *string
bodystring
forceWikipediaRefreshboolean
frontmatterobject
maxWikipediaSnapshotAgeDaysinteger
overwriteboolean
slugstring
wikipediaLangstring

wizard_cancel

Cancel a wizard session and discard its in-memory answers.

ParameterTypeDescription
sessionId *string

character_wizard

Return the Narrarium character creation checklist so the agent can gather the right information before creating a character file.

ParameterTypeDescription
namestring

create_character

Create a rich character file using the Narrarium character wizard fields. Use this instead of the generic entity tool when the user is adding a real story character.

ParameterTypeDescription
backgroundSummary *string
functionInBook *string
name *string
roleTier *string
rootPath *string
speakingStyle *string
ageinteger
aliasesarray
arcstring
currentIdentitystring
desiresarray
externalConflictstring
factionsarray
fearsarray
firstImpressionstring
forceWikipediaRefreshboolean
formerNamesarray
frontmatterobject
historicalboolean
homeLocationstring
identityArcstring
identityShiftsarray
internalConflictstring
introducedInstring
knownFromstring
mannerismsarray
maxWikipediaSnapshotAgeDaysinteger
occupationstring
originstring
overwriteboolean
privateNotesstring
pronunciationstring
relationshipsarray
revealInstring
secretRefsarray
slugstring
spokenNamestring
storyRolestring
timelineAgesobject
traitsarray
ttsLabelstring
wikipediaLangstring
wikipediaTitlestring

location_wizard

Return the Narrarium location creation checklist so the agent can gather the right details before creating a location file.

ParameterTypeDescription
namestring

create_location

Create a rich location file with atmosphere, story function, landmarks, risks, and optional historical research support.

ParameterTypeDescription
atmosphere *string
functionInBook *string
name *string
rootPath *string
basedOnRealPlaceboolean
factionsPresentarray
forceWikipediaRefreshboolean
frontmatterobject
historicalboolean
knownFromstring
landmarksarray
locationKindstring
maxWikipediaSnapshotAgeDaysinteger
overwriteboolean
privateNotesstring
pronunciationstring
regionstring
revealInstring
risksarray
secretRefsarray
slugstring
spokenNamestring
timelineRefstring
ttsLabelstring
wikipediaLangstring
wikipediaTitlestring

faction_wizard

Return the Narrarium faction creation checklist so the agent can gather the right details before creating a faction file.

ParameterTypeDescription
namestring

create_faction

Create a rich faction file with mission, ideology, methods, alliances, and optional historical research support.

ParameterTypeDescription
functionInBook *string
ideology *string
mission *string
name *string
rootPath *string
alliesarray
baseLocationstring
enemiesarray
factionKindstring
forceWikipediaRefreshboolean
frontmatterobject
hiddenAgendastring
historicalboolean
knownFromstring
leadersarray
maxWikipediaSnapshotAgeDaysinteger
methodsarray
overwriteboolean
privateNotesstring
pronunciationstring
publicImagestring
revealInstring
secretRefsarray
slugstring
spokenNamestring
ttsLabelstring
wikipediaLangstring
wikipediaTitlestring

item_wizard

Return the Narrarium item creation checklist so the agent can gather the right details before creating an item file.

ParameterTypeDescription
namestring

create_item

Create a rich item file with appearance, purpose, significance, ownership, and optional historical research support.

ParameterTypeDescription
appearance *string
functionInBook *string
name *string
purpose *string
rootPath *string
forceWikipediaRefreshboolean
frontmatterobject
historicalboolean
introducedInstring
itemKindstring
knownFromstring
limitationsarray
maxWikipediaSnapshotAgeDaysinteger
originStorystring
overwriteboolean
ownerstring
powersarray
privateNotesstring
pronunciationstring
revealInstring
secretRefsarray
significancestring
slugstring
spokenNamestring
ttsLabelstring
wikipediaLangstring
wikipediaTitlestring

secret_wizard

Return the Narrarium secret creation checklist so the agent can gather the right details before creating a secret file.

ParameterTypeDescription
titlestring

create_secret

Create a rich secret file with stakes, holders, protection, reveal strategy, and spoiler thresholds.

ParameterTypeDescription
functionInBook *string
rootPath *string
stakes *string
title *string
falseBeliefsarray
forceWikipediaRefreshboolean
frontmatterobject
historicalboolean
holdersarray
knownFromstring
maxWikipediaSnapshotAgeDaysinteger
overwriteboolean
privateNotesstring
pronunciationstring
protectedByarray
revealInstring
revealStrategystring
secretKindstring
secretRefsarray
slugstring
spokenNamestring
timelineRefstring
ttsLabelstring
wikipediaLangstring
wikipediaTitlestring

timeline_event_wizard

Return the Narrarium timeline event checklist so the agent can gather the right details before creating a timeline event file.

ParameterTypeDescription
titlestring

create_timeline_event

Create a timeline event file with participants, significance, consequences, and optional factual research support.

ParameterTypeDescription
rootPath *string
title *string
consequencesarray
datestring
forceWikipediaRefreshboolean
frontmatterobject
functionInBookstring
historicalboolean
knownFromstring
maxWikipediaSnapshotAgeDaysinteger
overwriteboolean
participantsarray
privateNotesstring
pronunciationstring
revealInstring
secretRefsarray
significancestring
slugstring
spokenNamestring
ttsLabelstring
wikipediaLangstring
wikipediaTitlestring

chapter_wizard

Return the Narrarium chapter checklist so the agent can gather the right details before creating a chapter.

ParameterTypeDescription
titlestring

paragraph_wizard

Return the Narrarium paragraph or scene checklist so the agent can gather the right details before creating a paragraph file.

ParameterTypeDescription
titlestring

chapter_writing_context

Assemble the point-in-time context that should be read before writing or polishing a chapter: the selected ghostwriter profile, scoped story-so-far context, prior chapter state, and matching chapter draft without leaking later story material. In prose, keep canon names as plain text instead of markdown links; the reader resolves visible mentions.

ParameterTypeDescription
chapter *string
rootPath *string

paragraph_writing_context

Assemble the point-in-time context that should be read before writing or polishing a paragraph: the selected ghostwriter profile, scoped story-so-far context, prior scenes only, and the matching paragraph draft or final paragraph without leaking later story material. In prose, keep canon names as plain text instead of markdown links; the reader resolves visible mentions.

ParameterTypeDescription
chapter *string
paragraph *string
rootPath *string

revise_chapter

Propose a chapter-level editorial pass without writing files. Use this when you want diagnosis plus scene-by-scene rewrite proposals for an existing final chapter. The result can also suggest merged state_changes review if multiple scenes touch continuity-sensitive beats.

ParameterTypeDescription
chapter *string
mode *string
rootPath *string
intensitystring
preserveFactsboolean

revise_paragraph

Propose a revision for an existing final paragraph without writing files. Use this for targeted editorial passes like clarity, pacing, tension, dialogue, voice, show-dont-tell, or redundancy cleanup. Show the proposal to the user first, then apply it with update_paragraph only after clear confirmation. The result can also suggest state_changes to review if the paragraph carries continuity-sensitive beats.

ParameterTypeDescription
chapter *string
mode *string
paragraph *string
rootPath *string
intensitystring
preserveFactsboolean

review_dialogue_action_beats

Review a final paragraph beat by beat to judge whether dialogue-adjacent actions are purposeful, weak, or better replaced with a simple speech tag. This is proposal-only and may also suggest new beats or recurring tics worth observing for character canon.

ParameterTypeDescription
chapter *string
paragraph *string
rootPath *string
allowMissingActionAddsboolean
allowSaidFallbackboolean
includeTicSuggestionsboolean
intensitystring
preserveDialogueWordsboolean

resume_book_context

Assemble restart context for a book project using prose rules, stable context, summaries, and exported conversations. You can also scope it to a target chapter or paragraph so the canon only reflects the story up to that writing point.

ParameterTypeDescription
rootPath *string
chapterstring
paragraphstring

create_entity

Create a canonical entity markdown file inside the local book repository. Use this for quick stubs, items, locations, factions, secrets, and timeline events. Prefer create_character for full story characters.

ParameterTypeDescription
kind *string
rootPath *string
bodystring
forceWikipediaRefreshboolean
frontmatterobject
historicalboolean
maxWikipediaSnapshotAgeDaysinteger
overwriteboolean
slugstring
wikipediaLangstring
wikipediaTitlestring

create_chapter

Create a chapter folder, chapter metadata file, and paired resume and evaluation files in the local book repository. In prose bodies, keep canon names as plain text instead of markdown links to canon files.

ParameterTypeDescription
number *integer
rootPath *string
title *string
bodystring
frontmatterobject
ghostwriterstring
narrationPersonstring
narrationTensestring
overwriteboolean
povarray
proseModearray
summarystring
tagsarray
timelineRefstring

create_paragraph

Create a numbered paragraph or scene markdown file inside an existing chapter folder. In prose bodies, keep canon names as plain text instead of markdown links to canon files.

ParameterTypeDescription
chapter *string
number *integer
rootPath *string
title *string
bodystring
frontmatterobject
ghostwriterstring
overwriteboolean

create_chapter_draft

Create a rough chapter draft inside drafts/ using the same chapter slug structure as the final chapter tree. Keep canon names as plain text in the draft prose instead of markdown links.

ParameterTypeDescription
number *integer
rootPath *string
title *string
bodystring
frontmatterobject
ghostwriterstring
narrationPersonstring
narrationTensestring
overwriteboolean
povarray
proseModearray
summarystring
tagsarray
timelineRefstring

update_chapter_draft

Update an existing chapter draft by patching its frontmatter and replacing or appending rough draft body content.

ParameterTypeDescription
chapter *string
rootPath *string
appendBodystring
bodystring
frontmatterPatchobject

update_book_notes

Update the global working notes or story-design document. Use appendBody when the user asks you to keep a note without replacing the whole file.

ParameterTypeDescription
rootPath *string
appendBodystring
bodystring
frontmatterPatchobject
targetstring

save_book_item

Create or update a structured idea or note entry at book level. Use this for active idea queues and note queues rather than freeform body edits.

ParameterTypeDescription
body *string
bucket *string
rootPath *string
title *string
entryIdstring
statusstring
tagsarray

save_chapter_item

Create or update a structured idea or note entry tied to a chapter draft.

ParameterTypeDescription
body *string
bucket *string
chapter *string
rootPath *string
title *string
entryIdstring
statusstring
tagsarray

update_chapter_notes

Update or append chapter-specific working notes stored in drafts/<chapter>/notes.md. Use this when the user wants to keep or refine notes tied to a chapter draft.

ParameterTypeDescription
chapter *string
rootPath *string
appendBodystring
bodystring
frontmatterPatchobject

promote_book_item

Promote a structured book-level idea or note out of the active queue. You can move it into notes or story design, or archive it as promoted after you already used it in a draft.

ParameterTypeDescription
entryId *string
promotedTo *string
rootPath *string
source *string
targetstring

promote_chapter_item

Promote a structured chapter-level idea or note out of the active queue. You can move it into chapter notes or archive it as promoted after using it in draft work.

ParameterTypeDescription
chapter *string
entryId *string
promotedTo *string
rootPath *string
source *string
targetstring

create_paragraph_draft

Create a rough paragraph or scene draft inside drafts/ using the same chapter tree as the final chapter.

ParameterTypeDescription
chapter *string
number *integer
rootPath *string
title *string
bodystring
frontmatterobject
ghostwriterstring
overwriteboolean

update_paragraph_draft

Update an existing paragraph draft by patching its frontmatter and replacing or appending rough scene content. Keep canon names as plain text in the draft prose instead of markdown links.

ParameterTypeDescription
chapter *string
paragraph *string
rootPath *string
appendBodystring
bodystring
frontmatterPatchobject

create_chapter_from_draft

Promote a chapter draft into the final chapters/ tree. It copies structural frontmatter from drafts/, accepts polished body text if provided, and syncs plot.md after writing. Final prose should keep canon names as plain text instead of markdown links.

ParameterTypeDescription
chapter *string
rootPath *string
bodystring
frontmatterPatchobject
overwriteboolean

create_paragraph_from_draft

Promote a paragraph draft into the final chapters/ tree. It copies structural frontmatter from drafts/, accepts polished body text if provided, and syncs plot.md after writing. Final prose should keep canon names as plain text instead of markdown links.

ParameterTypeDescription
chapter *string
paragraph *string
rootPath *string
bodystring
frontmatterPatchobject
overwriteboolean

create_asset_prompt

Create an asset prompt markdown file in the canonical assets tree for a book, entity, chapter, or paragraph image.

ParameterTypeDescription
rootPath *string
subject *string
aspectRatiostring
assetKindstring
bodystring
extensionstring
frontmatterobject
modelstring
orientationstring
overwriteboolean
promptStyleRefstring
providerstring

register_asset

Copy an existing image into the canonical assets tree and create its matching prompt metadata file.

ParameterTypeDescription
rootPath *string
sourceFilePath *string
subject *string
aspectRatiostring
assetKindstring
bodystring
extensionstring
frontmatterobject
modelstring
orientationstring
overwriteboolean
promptStyleRefstring
providerstring

generate_asset_image

Generate an image for a canonical subject, save it into the assets tree, and keep the asset prompt metadata in sync.

ParameterTypeDescription
rootPath *string
subject *string
aspectRatiostring
assetKindstring
modelstring
orientationstring
overwriteboolean
promptstring
promptStyleRefstring
providerstring

update_chapter

Update an existing chapter metadata file and optional chapter notes body. Use this for summary, POV, tags, and chapter notes changes without touching chapter numbering or folder naming. In prose bodies, keep canon names as plain text instead of markdown links.

ParameterTypeDescription
chapter *string
rootPath *string
appendBodystring
bodystring
frontmatterPatchobject

update_paragraph

Apply an existing paragraph or scene revision after the user confirmed it. Use this for summary, viewpoint, tags, and body revisions without renumbering or renaming the file. Keep canon names as plain text instead of markdown links; the MCP layer refreshes plot and resume files after the update.

ParameterTypeDescription
chapter *string
paragraph *string
rootPath *string
appendBodystring
bodystring
frontmatterPatchobject

apply_dialogue_action_beats

Apply confirmed dialogue action beat selections to a final paragraph after review_dialogue_action_beats. This only updates the chosen beats and then writes the paragraph.

ParameterTypeDescription
chapter *string
expectedParagraphHash *string
paragraph *string
reviewId *string
rootPath *string
selections *array

search_book

Search the local book repository across canon, chapters, notes, summaries, and research before drafting or editing.

ParameterTypeDescription
query *string
rootPath *string
limitinteger
scopesarray

query_canon

Answer a natural-language canon question by combining structured state, summaries, chapters, and repository search. Use this for questions like where a character is, what they know, who holds a secret, when something first appears, or how a relationship/condition/open loop changes across a chapter range.

ParameterTypeDescription
question *string
rootPath *string
fromChapterstring
limitinteger
throughChapterstring
toChapterstring

validate_book

Validate Narrarium frontmatter and file placement rules inside the local book repository.

ParameterTypeDescription
rootPath *string

update_entity

Update an existing entity file by patching frontmatter and optionally replacing or appending markdown body content. Use rename_entity when the slug, id, or asset folder must move.

ParameterTypeDescription
kind *string
rootPath *string
slugOrId *string
appendBodystring
bodystring
frontmatterPatchobject

rename_entity

Rename an entity in a safe way: update its slug and id, move its markdown file, and move any matching asset folder if present.

ParameterTypeDescription
kind *string
newNameOrTitle *string
rootPath *string
slugOrId *string
newSlugstring

rename_chapter

Rename a chapter title or number, move its folder, and move any matching chapter or paragraph asset folders if present.

ParameterTypeDescription
chapter *string
newTitle *string
rootPath *string
newNumberinteger

rename_paragraph

Rename a paragraph or scene title or number, move its markdown file, and move any matching paragraph asset folder if present.

ParameterTypeDescription
chapter *string
newTitle *string
paragraph *string
rootPath *string
newNumberinteger

sync_resume

Refresh a chapter resume or the total book resume from the current repository state without calling another model.

ParameterTypeDescription
rootPath *string
scope *string
chapterstring

sync_all_resumes

Refresh every chapter resume and the total book resume in one pass.

ParameterTypeDescription
rootPath *string

sync_story_state

Refresh state/current.md and per-chapter state snapshots from chapter resume state_changes. This stays manual by design and clears the stale story-state flag.

ParameterTypeDescription
rootPath *string

sync_plot

Refresh the root plot.md file so it tracks chapter progression, revealed secrets, and timeline dates from current canon.

ParameterTypeDescription
rootPath *string

evaluate_chapter

Refresh a full chapter evaluation by reading the whole chapter across all paragraph files, combining objective text signals with editorial reading against each scope's selected ghostwriter profile and canon coherence checks, then writing objective/editorial scores, a weighted verdict, an explanation of why that verdict landed there, and next steps plus paragraph evaluation files.

ParameterTypeDescription
chapter *string
rootPath *string

evaluate_paragraph

Refresh the saved evaluation for a single paragraph while still using the full chapter as context, including objective scores, editorial notes based on the selected ghostwriter, canon coherence checks, a weighted verdict, an explanation of why that verdict landed there, and concrete next steps.

ParameterTypeDescription
chapter *string
paragraph *string
rootPath *string

prepare_paragraph_evaluation

Compute objective text metrics and style context for a single paragraph and return them as structured data so the LLM can perform the editorial reading before calling write_paragraph_evaluation. Call this first, read the result carefully, then call write_paragraph_evaluation with your editorial judgment.

ParameterTypeDescription
chapter *string
paragraph *string
rootPath *string

write_paragraph_evaluation

Write the final paragraph evaluation file using LLM-supplied editorial strengths, concerns, canon notes, next steps, and verdict explanation combined with objective metrics recomputed from the current chapter state. Call prepare_paragraph_evaluation first to obtain the objective data before calling this tool.

ParameterTypeDescription
canonConcerns *array0–3 canon coherence issues observed
canonStrengths *array0–3 ways the paragraph handles canon mentions well
chapter *string
editorialConcerns *array1–4 specific editorial weaknesses observed
editorialStrengths *array1–4 specific editorial strengths observed in the prose
nextSteps *array1–4 concrete revision actions for this paragraph
paragraph *string
rootPath *string
verdictExplanation *string2–4 sentences explaining why the combined score lands where it does

evaluate_book

Refresh the total book evaluation with chapter scorecards, selected-ghostwriter editorial checks, canon coherence checks, weighted verdict summaries, explicit verdict explanations, and revision priorities, and optionally refresh all chapter and paragraph evaluations too.

ParameterTypeDescription
rootPath *string
syncChapterEvaluationsboolean

wikipedia_page

Fetch English and the user's request language Wikipedia page summaries and save them into research/wikipedia inside the local book repository.

ParameterTypeDescription
title *string
forceWikipediaRefreshboolean
langstring
maxWikipediaSnapshotAgeDaysinteger
rootPathstring
saveToResearchboolean
slugstring

export_epub

Export the current book repository into an EPUB file from the ordered chapter and paragraph markdown files.

ParameterTypeDescription
rootPath *string
authorstring
languagestring
outputPathstring
titlestring

create_persona

Create a reader persona file in personas/ of the book repository. Personas represent fictional reader archetypes used to review chapters from different perspectives. Each persona has reading habits, values, dislikes, beauty and readability focus areas, emotional triggers, and tolerance scores. Use seed_default_personas to populate the book with the five built-in archetypes instead of creating one manually.

ParameterTypeDescription
archetype *stringShort archetype label, e.g. 'casual reader', 'literary critic'
name *stringFull display name of the persona, e.g. 'The Casual Reader'
rootPath *stringAbsolute path to the book repository root
ageRangestringAge range or description, e.g. '30s', 'teenager'
beautyFocusarrayAspects this persona focuses on when judging prose beauty
bodystringOptional custom markdown body; auto-generated if omitted
complexityToleranceintegerTolerance for narrative complexity (1=very low, 5=very high)
dislikesarrayWhat this persona dislikes or finds off-putting
emotionalTriggersarrayWhat emotionally moves this persona
overwriteboolean
pacingToleranceintegerTolerance for slow pacing (1=very low, 5=very high)
readabilityFocusarrayAspects this persona focuses on when judging readability
readingHabitsstringHow and why this persona reads
slugstringFile slug (auto-derived from name if omitted)
tagsarray
valuesarrayWhat this persona values most in a story

seed_default_personas

Seed the book repository with the five built-in reader personas if they do not already exist. The default personas are: The Casual Reader, The Literary Critic, The Genre Fan, The Empathetic Reader, The Impatient Skimmer. Already-existing persona files are never overwritten. Call this once when setting up a new book to have a ready-made panel of reviewers.

ParameterTypeDescription
rootPath *stringAbsolute path to the book repository root

list_personas

List all reader personas defined in the book repository's personas/ folder. Returns each persona's slug, name, archetype, complexity tolerance, and pacing tolerance. Use this before calling review_chapter_with_personas to know which personas are available.

ParameterTypeDescription
rootPath *stringAbsolute path to the book repository root

review_chapter_with_personas

Review a chapter from the perspective of one or more reader personas and write the results to evaluations/chapters/<chapter>/personas-review.md. ## Workflow 1. Call list_personas (or load the persona files directly) to know which personas exist. 2. Read the chapter prose using chapter_writing_context or by reading the chapter files directly. 3. For each persona, simulate how that reader would experience the chapter: - Assign a beauty score (1–10): how aesthetically pleasing is the prose to this persona? - Assign a readability score (1–10): how easy and enjoyable is it to read for th…

ParameterTypeDescription
chapterSlug *stringSlug of the chapter being reviewed
reviews *arrayOne review entry per persona
rootPath *stringAbsolute path to the book repository root

create_script

Create a new scene script in scripts/<chapter>/<paragraph>.md using the Narrarium script meta-language. ## Script nested block format Scripts are a nested tree. `{ ... }` blocks are CONTAINERS that can nest other blocks; `[ ... ]` blocks are PRIMITIVES (leaves). A container opens with `{<kind> attr=value attr="quoted value"` on its own line and closes with a `}` on its own line. A primitive is `[<kind> attr=value]` optionally followed by free text on the same line. ### Containers | Syntax | Meaning | | --- | --- | | `{section title="..." goal="..." pov=character:id location=location:id ..…

ParameterTypeDescription
chapter *stringChapter slug or id (e.g. '001-opening' or 'chapter:001-opening')
number *integerParagraph number within the chapter
rootPath *stringAbsolute path to the book repository root
title *stringParagraph title (used to build the filename slug)
bodystringFull script body using the meta-language. If omitted a template is generated.
characterRefsarrayCharacter ids referenced by this script
factionRefsarrayFaction ids referenced by this script
ghostwriterstringGhostwriter profile slug selected for this script
itemRefsarrayItem ids referenced by this script
locationstringWhere the scene takes place — free text or canon location slug
locationRefsarrayLocation ids referenced by this script
overwritebooleanOverwrite if the script already exists
revealPolicyobjectReveal mode by secret id
secretRefsarraySecret ids referenced by this script
tagsarrayOptional tags
timelineRefsarrayTimeline event ids referenced by this script

update_script

Update an existing scene script in scripts/<chapter>/<paragraph>.md. Use this to refine beats, add new lines, or patch frontmatter (e.g. change location or tags). Provide `body` to fully replace the script body, or `appendBody` to add lines at the end. ## Script nested block format Scripts are a nested tree. `{ ... }` blocks are CONTAINERS that can nest other blocks; `[ ... ]` blocks are PRIMITIVES (leaves). A container opens with `{<kind> attr=value attr="quoted value"` on its own line and closes with a `}` on its own line. A primitive is `[<kind> attr=value]` optionally followed by free…

ParameterTypeDescription
chapter *stringChapter slug or id
paragraph *stringParagraph slug or id (e.g. '001-arrival' or 'paragraph:001-opening:001-arrival')
rootPath *stringAbsolute path to the book repository root
appendBodystringLines to append to the existing script body
bodystringNew full script body — replaces existing content
frontmatterPatchobjectFrontmatter fields to patch (e.g. location, tags)

sync_script_ledger

Regenerate state/script-ledger.md deterministically from every script file, including secret maps, variable timelines, continuity directives, and parser/prose checks.

ParameterTypeDescription
rootPath *stringAbsolute path to the book repository root

read_script_ledger

Read the generated state/script-ledger.md file, if it exists.

ParameterTypeDescription
rootPath *stringAbsolute path to the book repository root

read_script

Read an existing scene script and return its meta-language body plus the legend. Use this to inspect a script before writing prose, or to check what beats are planned.

ParameterTypeDescription
chapter *stringChapter slug or id
paragraph *stringParagraph slug or id
rootPath *stringAbsolute path to the book repository root

script_to_paragraph

Assemble the full writing context needed to turn a scene script into polished prose. Returns: - The script body with meta-language beats - The script meta-language legend - The selected ghostwriter profile, including its style and punctuation fields - The existing paragraph body if one already exists (revision mode) After calling this tool, write the paragraph prose following the selected ghostwriter and the beat order in the script, then call `create_paragraph` or `update_paragraph` with the result.

ParameterTypeDescription
chapter *stringChapter slug or id
paragraph *stringParagraph slug or id
rootPath *stringAbsolute path to the book repository root

paragraph_to_script

Reverse-engineer a scene script skeleton from an existing paragraph body. Use this when: - A paragraph was written without a script and you want to create one retroactively. - You want to analyse the structure of an existing scene. - You want to create a script template that mirrors what was already written. The tool returns a suggested script body. Review and refine it, then call `create_script` or `update_script` to save it.

ParameterTypeDescription
chapter *stringChapter slug or id
paragraph *stringParagraph slug or id
rootPath *stringAbsolute path to the book repository root