Writing MCP

v3.29.3
io.github.hannasdev/mcp-writing Checked 10 hours ago Published 5 months ago

Metadata-first fiction editing and reasoning tools for long-form writing projects.

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

describe_workflows

Return the default workflow map and current project context for this server. Call this first in most sessions and again whenever you are unsure what to do next. Treat sidecars, frontmatter, Scrivener-derived fields, generated exports, and backups by their named compatibility, review, or recovery roles; use outcome workflows for current SQLite-canonical structure and relationship changes. Never write scripts to invoke tools — call them directly.

sync

Re-scan the sync folder and update derived scene/character/place indexes from disk. For already managed projects, sync reports file-derived chapter or epigraph drift without adopting it as canonical structure; use explicit import, repair, or structure tools for structural changes.

diagnose_structure

Run read-only structure diagnostics against the current index, sync files, and generated structure exports. Reports canonical drift, ambiguous folder-derived structure, unknown chapter links, epigraph conflicts, compatibility chapter mismatches, and export trust/staleness issues without repairing files or mutating the database.

ParameterTypeDescription
project_idstringOptional project ID to limit diagnostics to one project.
structure_export_dirstringDirectory under WRITING_SYNC_DIR containing generated structure exports. Defaults to structure-exports.

export_structure_snapshot

Generate a deterministic JSON structure export from SQLite canonical state for Git review and future explicit recovery workflows. The export is generated transparency only: editing it does not change canonical state.

ParameterTypeDescription
project_id *stringProject ID to export (e.g. 'test-novel').
output_dirstringDirectory under WRITING_SYNC_DIR where the export JSON should be written. Defaults to structure-exports.

export_project_backup

Generate a deterministic project backup bundle from SQLite canonical state. Writes manifest.json, canonical.snapshot.json, and operations.jsonl under WRITING_SYNC_DIR for explicit review and future restore workflows; this is generated transparency only and does not mutate canonical state.

ParameterTypeDescription
project_id *stringProject ID to back up (e.g. 'test-novel' or 'universe-1/book-1-the-lamb').
output_dirstringDirectory under WRITING_SYNC_DIR where manifest.json, canonical.snapshot.json, and operations.jsonl should be written. Defaults to project-backups/<project_id>.

diagnose_project_backups

Run read-only diagnostics for a generated project backup bundle. Reports missing, partial, wrong-project, incompatible-schema, tampered, unreadable, and stale backups without mutating SQLite or generated files.

ParameterTypeDescription
project_id *stringProject ID whose backup bundle should be diagnosed (e.g. 'test-novel').
backup_dirstringDirectory under WRITING_SYNC_DIR containing manifest.json and canonical.snapshot.json. Defaults to project-backups/<project_id>.

restore_structure_from_export

Explicitly restore canonical SQLite chapter, scene-placement, and epigraph structure from a trusted generated structure export. This is a repair workflow, never a sync side effect; it validates project identity, schema, checksum, file presence, and conflicts before applying a transaction.

ParameterTypeDescription
project_id *stringProject ID to restore (e.g. 'test-novel').
dry_runbooleanIf true (default), validate and summarize planned repairs without writing SQLite state.
structure_export_dirstringDirectory under WRITING_SYNC_DIR containing generated structure exports. Ignored when structure_export_path is provided. Defaults to structure-exports.
structure_export_pathstringPath under WRITING_SYNC_DIR to the generated structure export JSON. Defaults to structure-exports/<project>.structure.json.

restore_project_from_backup

Explicitly restore a project from a trusted generated project backup bundle. Defaults to dry-run planning; dry_run=false applies canonical SQLite changes transactionally after the reviewed current snapshot checksum and required destructive or cross-scope confirmations are provided. Restore plan and confirmation-refusal responses include compact plan_summary details; confirmation refusals include blocking_requirements. include_unchanged=false suppresses unchanged row details while preserving summary counts.

ParameterTypeDescription
project_id *stringProject ID to restore (e.g. 'test-novel' or 'universe-1/book-1-the-lamb').
backup_pathstringPath under WRITING_SYNC_DIR to a project backup directory, manifest.json, or canonical.snapshot.json. Defaults to project-backups/<project_id>.
confirm_cross_scopebooleanRequired with dry_run=false when the restore plan changes universe-scoped records.
confirm_destructivebooleanRequired with dry_run=false when the restore plan includes delete candidates.
dry_runbooleanIf true (default), validate and summarize the restore plan without writing SQLite state.
expected_current_snapshot_checksumstringRequired with dry_run=false; pass the current_snapshot_checksum returned by the reviewed dry-run plan to guard against state changes before apply.
include_unchangedbooleanIf false, suppress unchanged rows from plan.changes while preserving plan_summary counts. Defaults to true for compatibility.

import_scrivener_sync

[STABLE] Import Scrivener External Folder Sync Draft files into this server's WRITING_SYNC_DIR by generating scene sidecars and reconciling by Scrivener binder ID. This is the recommended default path for first-time setup before sync().

ParameterTypeDescription
source_dir *stringPath to Scrivener external sync folder (the folder that contains Draft/, or Draft/ itself).
auto_syncbooleanIf true (default), runs sync() after import when not dry-run.
dry_runbooleanIf true, reports planned writes without changing files.
ignore_patternsarrayArray of regex patterns matched against filenames. Files matching any pattern are excluded from import. Useful to skip fragments, beat-sheet notes, or feedback files.
preflightbooleanIf true, returns a list of files that would be processed without doing any work. Use to verify scope before a large import.
project_idstringProject ID override (e.g. 'the-lamb'). Defaults to a slug derived from WRITING_SYNC_DIR.

import_scrivener_sync_async

[STABLE] Start an asynchronous Scrivener External Folder Sync import job. This is the recommended default import path when the sync tree is large. Returns immediately with a job_id to poll via get_async_job_status.

ParameterTypeDescription
source_dir *stringPath to Scrivener external sync folder (the folder that contains Draft/, or Draft/ itself).
auto_syncbooleanIf true, runs sync() after a non-dry-run async import finishes.
dry_runbooleanIf true, reports planned writes without changing files.
ignore_patternsarrayArray of regex patterns matched against filenames. Files matching any pattern are excluded from import.
preflightbooleanIf true, returns a list of files that would be processed without doing any work.
project_idstringProject ID override (e.g. 'the-lamb' or 'universe-1/book-1-the-lamb').

merge_scrivener_project_beta

Merge metadata directly from a Scrivener .scriv project into existing scene sidecars by starting a background job. This path is opt-in and requires sidecars to already exist (for example, from import_scrivener_sync). Returns immediately with a job_id to poll via get_async_job_status.

ParameterTypeDescription
source_project_dir *stringPath to a Scrivener .scriv bundle directory.
auto_syncbooleanIf true, runs sync() after a non-dry-run async merge finishes.
dry_runbooleanIf true (default), reports planned merges without writing files.
organize_by_chaptersbooleanIf true (default false), relocate scene files into chapter-based folder hierarchies. Chapter metadata is always extracted to sidecars.
project_idstringProject ID containing existing sidecars (e.g. 'the-lamb' or 'universe-1/book-1-the-lamb').
scenes_dirstringAbsolute path to the scenes directory containing .meta.yaml sidecars. Overrides the path derived from project_id.

enrich_scene_characters_batch

Start an asynchronous prose-derived relationship repair job that infers scene character mentions and updates scene character links. Defaults to dry_run=true; apply mode retains scene sidecar characters as compatibility output, then syncs SQLite scene_characters and refreshes project backups for changed scenes.

ParameterTypeDescription
project_id *stringProject ID (e.g. 'the-lamb' or 'universe-1/book-1-the-lamb').
chapterintegerOptional read-scope compatibility alias resolved through canonical chapter identity. Not a structural mutation target.
chapter_idstringOptional canonical chapter identifier.
confirm_replacebooleanMust be true when replace_mode=replace.
dry_runbooleanIf true (default), returns preview results without writing compatibility metadata.
include_match_detailsbooleanIf true, include extra match diagnostics per scene.
max_scenesintegerHard guardrail for resolved scene count (default: 200).
only_stalebooleanIf true, only process scenes currently marked metadata_stale.
partintegerOptional part number filter.
replace_modestringmerge (default): add inferred IDs; replace: overwrite characters with inferred IDs.
scene_idsarrayOptional allowlist of scene IDs to process before other filters are applied.

get_async_job_status

Get status and result for an asynchronous job started by async tools such as import_scrivener_sync_async, merge_scrivener_project_beta, or enrich_scene_characters_batch. Use this to poll job progress after receiving a job_id. Common next step: if status is still running, call this tool again; if status is completed inspect result, and if status is failed or cancelled inspect job/result diagnostics.

ParameterTypeDescription
job_id *stringJob ID returned by an async start tool.
include_resultbooleanIf true (default), includes completed result payload when available.

list_async_jobs

List asynchronous jobs currently known to this server. Use this when you lost a job_id or need a dashboard view of running/completed jobs. Returns an object envelope containing a jobs array of job objects sorted by newest first.

ParameterTypeDescription
include_resultsbooleanIf true, includes completed result payloads.

cancel_async_job

Cancel a running asynchronous job. Use this when an import/merge/batch run was started with overly broad scope or is no longer needed. Returns the updated job state; cancellation is cooperative and may transition through 'cancelling' before 'cancelled'.

ParameterTypeDescription
job_id *stringJob ID returned by an async start tool.

enrich_scene

Re-derive lightweight scene metadata from current prose (logline and character mentions) and clear metadata_stale for that scene. Only available when the sync dir is writable.

ParameterTypeDescription
scene_id *stringScene to enrich (e.g. 'sc-011-sebastian').
project_idstringProject ID. Required when scene_id is duplicated across projects.

find_scenes

Find scenes by filtering on character, Save the Cat beat, tags, canonical chapter identity, numeric chapter alias, or POV. Returns ordered scene metadata only — no prose. Most filters are optional and combinable. `character` and `pov` prefer character_id values and may resolve unambiguous project-scoped character names when project_id is provided. `tag` and `beat` match case-insensitively when unambiguous; near matches are suggestion-only. `chapter_id` requires `project_id` and accepts exact canonical IDs or unambiguous case variants; ambiguous case variants return candidate IDs. Numeric `ch…

ParameterTypeDescription
beatstringSave the Cat beat name (e.g. 'Opening Image'). Matches existing indexed beat values case-insensitively; near matches are suggestions only.
chapterintegerRead-scope compatibility alias resolved from canonical chapter sort order. Not a structural mutation target.
chapter_idstringCanonical chapter identifier. Requires project_id. Case variants of existing chapter_id values are accepted. Use list_chapters to find valid values.
characterstringA character_id (e.g. 'char-mira-nystrom'), or an unambiguous project-scoped character name when project_id is provided. Returns only scenes that character appears in. Use list_characters first to find…
pageintegerOptional page number for paginated responses (1-based).
page_sizeintegerOptional page size for paginated responses (default: 20, max: 200).
partintegerPart number (integer, e.g. 1). Chapters are numbered globally across the whole project.
povstringPOV character_id, or an unambiguous project-scoped character name when project_id is provided. Use list_characters first to find valid IDs.
project_idstringProject ID (e.g. 'the-lamb'). Use to scope results to one project.
tagstringScene tag to filter by. Matches existing indexed tag values case-insensitively; near matches are suggestions only.

get_scene_prose

Load the full prose text of a single scene. Use this for close reading, continuity checks, or when you need the actual writing. For overview or filtering, use find_scenes instead — it is much cheaper. Optionally retrieve a past version from git history. If scene IDs are reused across projects, omitting project_id returns CONFLICT with candidate project_ids.

ParameterTypeDescription
scene_id *stringThe scene_id to retrieve (e.g. 'sc-001-prologue'). Get this from find_scenes or get_arc.
commitstringOptional git commit hash to retrieve a past version. Use list_snapshots to find valid hashes. If omitted, returns the current prose.
project_idstringOptional project ID to disambiguate duplicate scene IDs across projects.

get_chapter_prose

Load the full prose for every scene in a chapter, concatenated in order. Provide chapter_id or chapter, plus project_id. Canonical targeting uses chapter_id; numeric chapter remains available as a read-scope compatibility alias resolved from canonical sort order. Expensive — only use when you need to read an entire chapter. Capped at 10 scenes. Use find_scenes first to confirm the chapter exists.

ParameterTypeDescription
project_id *stringProject ID (e.g. 'the-lamb').
chapterintegerRead-scope compatibility alias resolved from canonical chapter sort order. Not a structural mutation target.
chapter_idstringCanonical chapter identifier.

list_chapters

List canonical chapters for a project. Returns chapter_id plus compatibility sort order so callers can orient from numeric chapter aliases without treating those aliases as structural authority.

ParameterTypeDescription
project_id *stringProject ID.

find_epigraphs

List canonical epigraphs for a project, optionally narrowed to a canonical chapter_id or read-scope numeric chapter alias.

ParameterTypeDescription
project_id *stringProject ID.
chapterintegerRead-scope compatibility alias resolved from canonical chapter sort order. Not a structural mutation target.
chapter_idstringCanonical chapter identifier.

get_arc

Get every scene a character appears in, ordered by part, canonical chapter order, and scene position. Returns scene metadata only — no prose. Use this as the primary structural entry point when the question is about a character's progression through the manuscript. Supports pagination via page/page_size and auto-paginates large result sets with total_count. Use list_characters only when you need help finding a character_id. Response shape note: always returns a structured envelope (`results`, `total_count`, with pagination fields when paging is active).

ParameterTypeDescription
character_id *stringThe character_id to trace (e.g. 'char-mira-nystrom'). Use list_characters to find valid IDs.
pageintegerOptional page number for paginated responses (1-based).
page_sizeintegerOptional page size for paginated responses (default: 20, max: 200).
project_idstringLimit to a specific project (e.g. 'the-lamb').

list_characters

List indexed characters with their character_id, name, role, and arc_summary. Use this mainly as a lookup and disambiguation helper when you need to find a character_id for a broader reasoning task. Response shape note: returns a structured envelope (`results`, `total_count`).

ParameterTypeDescription
project_idstringLimit to a specific project (e.g. 'the-lamb').
universe_idstringLimit to a specific universe (if using cross-project world-building).

get_character_sheet

Get full character details: role, arc_summary, traits, the canonical sheet content, and any adjacent support notes when the character uses a folder-based layout. Use this when the reasoning task needs the character's canonical profile rather than only their scene progression. Response shape note: returns a structured envelope (`results`, `total_count`) with one result row.

ParameterTypeDescription
character_id *stringThe character_id to look up (e.g. 'char-sebastian'). Use list_characters to find valid IDs.

list_places

List indexed places with their place_id and name. Use this mainly as a lookup and disambiguation helper when place context becomes relevant to the current reasoning task. Response shape note: returns a structured envelope (`results`, `total_count`).

ParameterTypeDescription
project_idstringLimit to a specific project (e.g. 'the-lamb').
universe_idstringLimit to a specific universe.

get_place_sheet

Get full place details, including canonical sheet content plus retained sidecar associated_characters and tags as compatibility/review notes. Use connect_character_place_evidence when scene-backed character/place evidence is paired, or connect_scene_place_evidence when scene evidence is place-only. Response shape note: returns a structured envelope (`results`, `total_count`) with one result row.

ParameterTypeDescription
place_id *stringThe place_id to look up (e.g. 'place-harbor-district'). Use list_places to find valid IDs.

search_metadata

Keyword/FTS metadata search across scene titles, loglines (synopsis/logline text fields), and indexed metadata keywords (tags/characters/places/versions). Use this when you know likely words or exact metadata values but do not know the scene_id or chapter. This is not semantic search and does not search prose text; use find_scenes for structured filters and get_scene_prose after identifying likely scenes. Supports pagination via page/page_size and auto-paginates large result sets with total_count.

ParameterTypeDescription
query *stringKeyword search terms from indexed metadata (e.g. 'hospital' or a quoted character/place/tag phrase). FTS5 syntax supported.
pageintegerOptional page number for paginated responses (1-based).
page_sizeintegerOptional page size for paginated responses (default: 20, max: 200).

search_reference

Full-text search across indexed reference document titles, summaries, and tags. Use this to discover world-building notes, continuity references, research docs, and other reference material without loading full file contents. Response shape note: returns a structured envelope (`results`, `total_count`).

ParameterTypeDescription
query *stringSearch terms (e.g. 'vampirism' or 'blood replacement'). FTS5 syntax supported.
tagstringOptional exact tag filter.
typestringOptional reference type filter (for example: 'world', 'continuity', 'research', 'style').

list_scene_references

List direct reference documents linked from a scene via metadata (for example, reference_ids). Returns only one-hop scene -> reference links and does not recursively traverse related references. If scene IDs are reused across projects, omitting project_id returns CONFLICT with candidate project_ids. Response shape note: returns a structured envelope (`results`, `total_count`) plus the resolved `scene_id` and `project_id` context.

ParameterTypeDescription
scene_id *stringScene ID to inspect.
project_idstringOptional project ID to disambiguate duplicate scene IDs across projects.

get_reference_doc

Get metadata for a reference document by doc_id. Optionally includes exactly one hop of related reference docs.

ParameterTypeDescription
doc_id *stringReference document ID.
include_relatedbooleanIf true, include one-hop related reference docs.

list_threads

List subplot/storyline threads for a project. Returns a structured JSON envelope with results and total_count. Use this mainly as a lookup and disambiguation helper before deeper thread reasoning with get_thread_arc. Supports pagination via page/page_size.

ParameterTypeDescription
project_id *stringProject ID.
pageintegerOptional page number for paginated responses (1-based).
page_sizeintegerOptional page size for paginated responses (default: 20, max: 200).

get_thread_arc

Get ordered scene metadata for all scenes belonging to a thread, including the per-thread beat. Returns a structured JSON envelope with thread metadata, results, and total_count. Use this when the question is about subplot movement, continuity, or recurring storyline structure across scenes. Supports pagination via page/page_size.

ParameterTypeDescription
thread_id *stringThread ID.
pageintegerOptional page number for paginated responses (1-based).
page_sizeintegerOptional page size for paginated responses (default: 20, max: 200).

get_relationship_arc

Show how the relationship between two characters evolves across scenes, in order. Uses explicitly recorded relationship entries — returns a NO_RESULTS error if no entries exist yet. Use list_characters to get character_id values. Response shape note: returns a structured envelope { results, total_count, from_character, to_character }.

ParameterTypeDescription
from_character *stringcharacter_id of the first character (e.g. 'char-sebastian').
to_character *stringcharacter_id of the second character (e.g. 'char-mira-nystrom').
project_idstringLimit to a specific project (e.g. 'the-lamb').

suggest_scene_references

Suggest reference documents for a scene by aggregating links from the scene's characters and places. Returns weighted candidates ranked by how many entities in the scene link to each reference. Excludes any explicit scene reference links already present. In apply mode, selected links commit to SQLite first, project backups refresh, and scene sidecar/frontmatter output is refreshed only as generated compatibility.

ParameterTypeDescription
scene_id *stringScene ID (e.g. 'sc-011-sebastian').
max_applyintegerOptional cap for how many candidates to apply when mode='apply'.
min_scoreintegerOptional minimum candidate score. Candidates below this are excluded from preview/apply. Defaults to 1.
modestringUse 'preview' (default) to list candidates only, or 'apply' to persist selected suggestions as explicit scene links.
project_idstringOptional project scope to disambiguate an ambiguous scene_id across projects.
selected_doc_idsarrayOptional allowlist of doc_ids to apply when mode='apply'. If omitted, applies top-ranked candidates.

create_character_sheet

Create or reuse a canonical character sheet folder with sheet.md and sheet.meta.yaml so the character can be indexed immediately. If the folder already exists, missing canonical files are backfilled and the existing sheet is preserved.

ParameterTypeDescription
name *stringDisplay name of the character (e.g. 'Mira Nystrom').
fieldsobjectOptional starter metadata fields for the character sidecar.
notesstringOptional starter prose content for sheet.md.
project_idstringProject scope for a book-local character (e.g. 'universe-1/book-1-the-lamb' or 'test-novel').
universe_idstringUniverse scope for a cross-book shared character (e.g. 'universe-1').

create_place_sheet

Create or reuse a canonical place sheet folder with sheet.md and sheet.meta.yaml so the place can be indexed immediately. If the folder already exists, missing canonical files are backfilled and the existing sheet is preserved.

ParameterTypeDescription
name *stringDisplay name of the place (e.g. 'University Hospital').
fieldsobjectOptional starter metadata fields for the place sidecar.
notesstringOptional starter prose content for sheet.md.
project_idstringProject scope for a book-local place (e.g. 'universe-1/book-1-the-lamb' or 'test-novel').
universe_idstringUniverse scope for a cross-book shared place (e.g. 'universe-1').

track_thread_arc

Track a storyline, subplot, or recurring arc through a scene by recording the scene's thread beat. This is the outcome-level workflow for thread relationship changes: callers provide story intent, while SQLite thread tables, backup refresh, and rollback stay implementation details.

ParameterTypeDescription
project_id *stringProject the thread belongs to (e.g. 'the-lamb').
scene_id *stringScene that carries this thread beat (e.g. 'sc-011-sebastian').
thread_id *stringStable thread ID for the arc being tracked (e.g. 'thread-reconciliation').
thread_name *stringHuman-readable thread or arc name.
beatstringOptional story beat for this scene in the thread, such as setup, escalation, reveal, reversal, or payoff.
statusstringThread status (e.g. 'active', 'resolved'). Defaults to 'active'.

connect_character_place_evidence

Connect a character and place as paired scene-backed story evidence. This outcome-level workflow covers sheet-backed character/place associations: SQLite scene relationship indexes commit first, project backups refresh after commit, and scene sidecar characters/places are regenerated only as generated compatibility output from canonical indexes. Canonical IDs are preferred; unambiguous case-insensitive scene titles, character names, place names, and ID variants are resolved to canonical IDs before mutation. Ambiguous or suggested-only matches fail without mutating state. Use connect_scene_char…

ParameterTypeDescription
character_id *stringCharacter present in the scene. Prefer canonical character_id; an unambiguous case-insensitive character_id or character name in this project/universe scope is also accepted.
place_id *stringPlace present in the scene. Prefer canonical place_id; an unambiguous case-insensitive place_id or place name in this project/universe scope is also accepted.
project_id *stringProject the scene belongs to (e.g. 'the-lamb').
scene_id *stringScene that provides the evidence. Prefer canonical scene_id; an unambiguous case-insensitive scene_id or unique scene title in this project is also accepted.
notestringOptional review note explaining the evidence. Stored in operation history, not in compatibility sidecars.

connect_scene_character_evidence

Connect a sheet-backed character to a scene without requiring paired place evidence. This outcome-level workflow records character-only scene evidence in SQLite first, refreshes project backups after commit, and regenerates scene sidecar characters/places only as generated compatibility output from canonical indexes. Canonical IDs are preferred; unambiguous case-insensitive scene titles, character names, and ID variants are resolved to canonical IDs before mutation. Ambiguous or suggested-only matches fail without mutating state.

ParameterTypeDescription
character_id *stringSheet-backed character present in the scene. Prefer canonical character_id; an unambiguous case-insensitive character_id or character name in this project/universe scope is also accepted.
project_id *stringProject the scene belongs to (e.g. 'the-lamb').
scene_id *stringScene that provides the evidence. Prefer canonical scene_id; an unambiguous case-insensitive scene_id or unique scene title in this project is also accepted.
notestringOptional review note explaining the evidence. Stored in operation history, not in compatibility sidecars.

connect_scene_place_evidence

Connect a sheet-backed place to a scene without requiring paired character evidence. This outcome-level workflow records place-only scene evidence in SQLite first, refreshes project backups after commit, and regenerates scene sidecar characters/places only as generated compatibility output from canonical indexes. Canonical IDs are preferred; unambiguous case-insensitive scene titles, place names, and ID variants are resolved to canonical IDs before mutation. Ambiguous or suggested-only matches fail without mutating state.

ParameterTypeDescription
place_id *stringSheet-backed place present in the scene. Prefer canonical place_id; an unambiguous case-insensitive place_id or place name in this project/universe scope is also accepted.
project_id *stringProject the scene belongs to (e.g. 'the-lamb').
scene_id *stringScene that provides the evidence. Prefer canonical scene_id; an unambiguous case-insensitive scene_id or unique scene title in this project is also accepted.
notestringOptional review note explaining the evidence. Stored in operation history, not in compatibility sidecars.

record_character_relationship_beat

Record how two characters relate in a specific scene. This outcome-level workflow writes character relationship beats directly to SQLite, validates scene evidence, refreshes project backups after commit, and does not require callers to know the character_relationships table.

ParameterTypeDescription
from_character *stringFirst character_id in the relationship beat.
project_id *stringProject the scene evidence belongs to (e.g. 'the-lamb').
relationship_type *stringRelationship label such as trusts, protects, fears, betrays, or reconciles. Trimmed and lowercased before validation.
scene_id *stringScene that provides the evidence for this relationship beat.
to_character *stringSecond character_id in the relationship beat.
notestringOptional short evidence note for this beat.
strengthstringOptional qualitative strength or direction for this scene beat.

audit_relationship_metadata

Review relationship metadata authority, stale indexes, retained compatibility notes, and scene character/place sidecar drift without mutating SQLite or files. Use this before repair work when character/place associations, sidecar tags, scene threads, or recovery readiness look stale or ambiguous.

ParameterTypeDescription
project_idstringOptional project scope for the audit.

create_chapter

Create a canonical chapter record through the explicit structure workflow. Writes canonical chapter state only; it does not create scene files, sidecars, or Scrivener-compatible folders. Use assign_scene_to_chapter afterward to place unchaptered scenes in the new chapter.

ParameterTypeDescription
project_id *stringProject the chapter belongs to (e.g. 'the-lamb').
sort_index *integerCanonical chapter order within the project. Must be unused.
title *stringHuman-readable chapter title.
chapter_idstringOptional canonical chapter identifier. If omitted, one is derived from sort_index and title.
loglinestringOptional chapter-level logline.

rename_chapter

Rename a canonical chapter through the explicit structure workflow. Updates canonical chapter state and explicit scene chapter_title compatibility fields; it does not rename scene files, sidecars by path-derived structure, or Scrivener-compatible folders.

ParameterTypeDescription
chapter_id *stringCanonical chapter identifier. Use list_chapters to find valid values.
project_id *stringProject the chapter belongs to (e.g. 'the-lamb').
title *stringNew human-readable chapter title.

reorder_chapter

Reorder a canonical chapter through the explicit structure workflow. Updates canonical chapter order and explicit scene chapter/chapter_title compatibility fields; it does not rename, move, or resequence scene files, sidecars by path-derived structure, or Scrivener-compatible folders.

ParameterTypeDescription
chapter_id *stringCanonical chapter identifier. Use list_chapters to find valid values.
project_id *stringProject the chapter belongs to (e.g. 'the-lamb').
sort_index *integerNew canonical chapter order within the project. Must be unused.

attach_epigraph

Attach an existing canonical epigraph to a canonical chapter through the explicit structure workflow. Updates canonical epigraph linkage and explicit epigraph sidecar fields; it does not move, rename, or create epigraph source files or Scrivener-compatible folders.

ParameterTypeDescription
chapter_id *stringCanonical chapter identifier. Use list_chapters to find valid values.
epigraph_id *stringCanonical epigraph identifier. Use find_epigraphs to find valid values.
project_id *stringProject the epigraph belongs to (e.g. 'the-lamb').

move_scene

Move a scene through the explicit structure workflow. Writes canonical SQLite chapter linkage and/or timeline_position first, then mirrors compatibility fields to the scene sidecar and index; it does not move, rename, or resequence scene files or Scrivener-compatible folders.

ParameterTypeDescription
project_id *stringProject the scene belongs to (e.g. 'the-lamb').
scene_id *stringThe scene_id to move (e.g. 'sc-011-sebastian').
chapter_idstringOptional canonical chapter identifier. Use list_chapters to find valid values. Omit to keep the current chapter.
timeline_positionintegerOptional new position within the target chapter. Must be unused.

assign_scene_to_chapter

Assign a scene to a canonical chapter through the explicit structure workflow. Writes canonical SQLite chapter linkage first, then mirrors chapter_id plus compatibility chapter/chapter_title fields to the scene sidecar and index. Pass chapter_id=null to clear an explicit chapter link on an unchaptered scene. Use list_chapters first to choose a valid canonical chapter_id.

ParameterTypeDescription
chapter_id *string | nullCanonical chapter identifier. Use list_chapters to find valid values. Pass null to clear an explicit chapter link on an unchaptered scene.
project_id *stringProject the scene belongs to (e.g. 'the-lamb').
scene_id *stringThe scene_id to assign (e.g. 'sc-011-sebastian').

update_scene_metadata

Update one or more non-structural, non-relationship metadata fields for a scene. Writes only supplied allowed fields to the .meta.yaml sidecar and preserves existing structural compatibility fields; it never modifies prose, mirrors path-derived structure, or changes scene character/place relationship authority. Structural fields (part, chapter, chapter_id, chapter_title, timeline_position) are rejected here; use list_chapters plus assign_scene_to_chapter, move_scene, rename_chapter, or reorder_chapter for structure changes. Relationship fields (characters, places) are rejected here; use discov…

ParameterTypeDescription
fields *objectFields to update. Only supplied keys are changed.
project_id *stringProject the scene belongs to (e.g. 'the-lamb').
scene_id *stringThe scene_id to update (e.g. 'sc-011-sebastian').

update_character_sheet

Update canonical character profile fields such as name, role, arc_summary, first_appearance, and traits. SQLite commits first, project backups refresh after commit, and the .meta.yaml file is refreshed only as generated compatibility output; prose notes are never modified.

ParameterTypeDescription
character_id *stringThe character_id to update (e.g. 'char-mira-nystrom'). Use list_characters to find valid IDs.
fields *objectFields to update. Only supplied keys are changed.

update_place_sheet

Update canonical place profile fields and retained compatibility notes. The place name commits to SQLite first and refreshes project backups; associated_characters and tags are compatibility/review metadata only. Use connect_character_place_evidence when scene-backed character/place evidence is paired, or connect_scene_place_evidence when scene evidence is place-only.

ParameterTypeDescription
fields *objectFields to update. Only supplied keys are changed.
place_id *stringThe place_id to update (e.g. 'place-harbor-district'). Use list_places to find valid IDs.

flag_scene

Attach a continuity or review note to a scene as compatibility review metadata. Flags are not canonical relationship authority and do not mutate SQLite; use audit_relationship_metadata, connect_character_place_evidence, record_character_relationship_beat, or link_reference_evidence when the note identifies relationship repair work.

ParameterTypeDescription
note *stringThe flag note (e.g. 'Victor knows Mira’s name here, but they haven’t been introduced yet — contradicts sc-006').
project_id *stringProject the scene belongs to (e.g. 'the-lamb').
scene_id *stringThe scene_id to flag (e.g. 'sc-012-open-to-anyone').

preview_review_bundle

Dry-run planning tool for review bundles. Resolves scene scope, deterministic ordering, warnings, and planned output filenames without writing files. Rendering options are accepted for API consistency and reflected in resolved_scope.options, but do not change planning output.

ParameterTypeDescription
profile *stringBundle profile: outline_discussion, editor_detailed, or beta_reader_personalized.
project_id *stringProject ID to scope the review bundle (e.g. 'test-novel').
author_namestringOptional author name for the cover page (outline_discussion PDF only).
beta_accountabilitybooleanEnable accountability footer + fingerprint metadata for beta_reader_personalized output (default true for beta profile).
bundle_namestringOptional output bundle base name override (slugified in planned outputs).
bundle_titlestringOptional book or document title for the cover page (outline_discussion PDF only).
chapterintegerOptional read-scope compatibility alias resolved through canonical chapter identity. Not a structural mutation target.
chapter_idstringOptional canonical chapter identifier.
chaptersarrayOptional read-scope compatibility chapter-set alias resolved through canonical chapter identities. Use this for one/few specific chapters. Do not combine with chapter or chapter_id.
formatstringPlanned output format: pdf (default), markdown, or both. Affects planned_outputs filenames only; preview_review_bundle does not render artifacts.
include_metadata_sidebarbooleanRendering option (default false). Echoed in resolved_scope.options for downstream rendering; does not change planning results.
include_paragraph_anchorsbooleanRendering option (default false). Echoed in resolved_scope.options for downstream rendering; does not change planning results.
include_scene_idsbooleanRendering option (default true for editor_detailed; false for outline_discussion). beta_reader_personalized always resolves this to false, even when true is passed. Echoed in resolved_scope.options fo…
partintegerOptional part filter.
recipient_namestringOptional recipient display name for beta_reader_personalized profile.
scene_idsarrayOptional explicit scene_id allowlist. Intersects with other filters.
strictnessstringStrictness mode: warn (default) or fail.
tagstringOptional tag filter (exact match).

create_review_bundle

Generate review bundle artifacts (PDF/markdown) from planned scene scope. Writes files only under output_dir and returns manifest/provenance details.

ParameterTypeDescription
output_dir *stringDirectory path to write bundle artifacts into.
profile *stringBundle profile: outline_discussion, editor_detailed, or beta_reader_personalized.
project_id *stringProject ID to scope the review bundle (e.g. 'test-novel').
author_namestringOptional author name for the cover page (outline_discussion PDF only).
beta_accountabilitybooleanEnable accountability footer + fingerprint metadata for beta_reader_personalized output (default true for beta profile).
bundle_namestringOptional output bundle base name override (slugified in filenames).
bundle_titlestringOptional book or document title for the cover page (outline_discussion PDF only).
chapterintegerOptional read-scope compatibility alias resolved through canonical chapter identity. Not a structural mutation target.
chapter_idstringOptional canonical chapter identifier.
chaptersarrayOptional read-scope compatibility chapter-set alias resolved through canonical chapter identities. Use this for one/few specific chapters. Do not combine with chapter or chapter_id.
formatstringOutput format: pdf (default), markdown, or both.
include_metadata_sidebarbooleanInclude metadata sidebar in markdown output (default false). Markdown only — no effect on PDF.
include_paragraph_anchorsbooleanInclude paragraph anchors in markdown output (default false). Markdown only — no effect on PDF.
include_scene_idsbooleanInclude scene IDs in headings (default true for editor_detailed; false for outline_discussion). beta_reader_personalized always resolves this to false, even when true is passed. Applies to both PDF an…
partintegerOptional part filter.
recipient_namestringOptional recipient display name for beta_reader_personalized profile.
scene_idsarrayOptional explicit scene_id allowlist. Intersects with other filters.
source_commitstringOptional explicit source commit for provenance. Defaults to current HEAD when available.
strictnessstringStrictness mode: warn (default) or fail.
tagstringOptional tag filter (exact match).

setup_prose_styleguide_config

Create prose-styleguide.config.yaml at sync root or project root using language defaults plus optional explicit overrides.

ParameterTypeDescription
language *stringPrimary writing language. Seeds language-specific defaults.
overridesobjectOptional overrides layered on top of language defaults.
overwritebooleanIf true, replaces an existing config file at the target location.
project_idstringProject ID when writing project_root config (e.g. 'the-lamb' or 'universe-1/book-1').
scopestringConfig write target scope. Defaults to project_root when project_id is supplied, otherwise sync_root.
voice_notesstringOptional freeform voice notes to include in config.

get_prose_styleguide_config

Resolve prose-styleguide.config.yaml with cascading precedence (sync root, then universe root, then project root). Applies language-derived defaults and nested quotation defaults when omitted.

ParameterTypeDescription
project_idstringOptional project ID for project-scoped resolution (e.g. 'the-lamb' or 'universe-1/book-1').

summarize_prose_styleguide_config

Summarize the currently resolved prose styleguide config in plain language for review or confirmation.

ParameterTypeDescription
project_idstringOptional project ID for project-scoped resolution (e.g. 'the-lamb' or 'universe-1/book-1').

bootstrap_prose_styleguide_config

Detect dominant prose conventions from existing scenes and suggest initial prose-styleguide config values.

ParameterTypeDescription
project_id *stringProject ID to analyze (e.g. 'the-lamb' or 'universe-1/book-1').
chapterintegerOptional read-scope compatibility alias resolved through canonical chapter identity. Not a structural mutation target.
chapter_idstringOptional canonical chapter identifier.
include_scene_signalsbooleanIf true, include per-scene detected signals in the response.
max_scenesintegerMaximum number of scenes to analyze (default: 50).
min_agreementnumberMinimum agreement ratio for suggested fields (default: 0.6).
min_evidenceintegerMinimum number of observed scenes per field before suggesting it (default: 3).
partintegerOptional part filter.
scene_idsarrayOptional scene_id allowlist to analyze.

update_prose_styleguide_config

Update an existing prose-styleguide.config.yaml at sync-root or project-root scope by writing only explicit field changes.

ParameterTypeDescription
scope *stringConfig scope to update.
updates *objectExplicit config field changes to write at the selected scope.
project_idstringProject ID when updating project_root config (e.g. 'the-lamb' or 'universe-1/book-1').

preview_prose_styleguide_config_update

Preview how explicit updates would change an existing prose-styleguide.config.yaml without writing any files.

ParameterTypeDescription
scope *stringConfig scope to preview updates for.
updates *objectExplicit config field changes to preview at the selected scope.
project_idstringProject ID when previewing project_root config updates (e.g. 'the-lamb' or 'universe-1/book-1').

check_prose_styleguide_drift

Detect styleguide drift by comparing declared config conventions against observed signals in scene prose.

ParameterTypeDescription
project_id *stringProject ID to analyze (e.g. 'the-lamb' or 'universe-1/book-1').
chapterintegerOptional read-scope compatibility alias resolved through canonical chapter identity. Not a structural mutation target.
chapter_idstringOptional canonical chapter identifier.
include_clean_scenesbooleanIf true, include scenes with no detected drift in scene_results.
max_scenesintegerMaximum number of scenes to analyze (default: 50).
min_agreementnumberMinimum agreement ratio for suggested updates (default: 0.6).
partintegerOptional part filter.
scene_idsarrayOptional scene_id allowlist to analyze.

setup_prose_styleguide_skill

Generate skills/prose-styleguide/SKILL.md from the resolved prose styleguide config and universal craft rules. Optionally publish AI boot files (CLAUDE.md and .github/copilot-instructions.md) when using sync-root config scope.

ParameterTypeDescription
boot_files_overwritebooleanIf true, rewrites existing boot files instead of in-place updates.
overwritebooleanIf true, replaces an existing skills/prose-styleguide/SKILL.md file.
project_idstringProject-scoped skill generation is unsupported because this tool writes a shared sync-root skills/prose-styleguide/SKILL.md file.
publish_boot_filesbooleanIf true, also upserts CLAUDE.md and .github/copilot-instructions.md at sync root. Defaults to true.

propose_edit

Generate a proposed revision for a scene. Returns a proposal_id and a diff preview. Nothing is written yet — you must call commit_edit to apply the change. This tool requires git to be available. If scene IDs are reused across projects, omitting project_id returns CONFLICT with candidate project_ids.

ParameterTypeDescription
instruction *stringA brief instruction for the edit (e.g. 'Tighten the opening paragraph'). Used in the git commit message.
revised_prose *stringThe complete revised prose text for the scene.
scene_id *stringThe scene_id to revise (e.g. 'sc-011-sebastian').
bypass_reasonstringRequired when bypass_styleguide=true. Explains why this edit should ignore styleguide checks.
bypass_styleguidebooleanIf true, bypasses automatic styleguide checks for this proposal.
project_idstringOptional project ID to disambiguate duplicate scene IDs across projects.

commit_edit

Apply a proposed edit and commit it to git. First creates a pre-edit snapshot, then writes the revised prose and metadata back to disk. The scene metadata stale flag is cleared.

ParameterTypeDescription
proposal_id *stringThe proposal_id returned by propose_edit.
scene_id *stringThe scene_id being revised.
project_idstringOptional project ID. Required when scene IDs are duplicated across projects.

discard_edit

Discard a pending proposal without applying it. The proposal is deleted and the prose remains unchanged.

ParameterTypeDescription
proposal_id *stringThe proposal_id to discard (from propose_edit).

snapshot_scene

Manually create a git commit (snapshot) for the current state of a scene. Use this to mark important editing checkpoints outside of the propose/commit workflow.

ParameterTypeDescription
project_id *stringProject the scene belongs to.
reason *stringA brief reason for the snapshot (e.g. 'Character arc milestone reached').
scene_id *stringThe scene_id to snapshot.

list_snapshots

List git commit history for a scene, with timestamps and commit messages. Use this to find commit hashes for get_scene_prose historical retrieval.

ParameterTypeDescription
scene_id *stringThe scene_id to list snapshots for.
project_idstringOptional project ID to disambiguate duplicate scene IDs across projects.

get_runtime_config

Show the active runtime paths and capabilities for this server instance (server version, sync dir, database path, writability, permission diagnostics, and git availability). Use this to verify which manuscript location is currently connected.