Writing MCP
v3.29.3Metadata-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.
| Parameter | Type | Description |
|---|---|---|
project_id | string | Optional project ID to limit diagnostics to one project. |
structure_export_dir | string | Directory 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID to export (e.g. 'test-novel'). |
output_dir | string | Directory 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID to back up (e.g. 'test-novel' or 'universe-1/book-1-the-lamb'). |
output_dir | string | Directory 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID whose backup bundle should be diagnosed (e.g. 'test-novel'). |
backup_dir | string | Directory 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID to restore (e.g. 'test-novel'). |
dry_run | boolean | If true (default), validate and summarize planned repairs without writing SQLite state. |
structure_export_dir | string | Directory under WRITING_SYNC_DIR containing generated structure exports. Ignored when structure_export_path is provided. Defaults to structure-exports. |
structure_export_path | string | Path 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID to restore (e.g. 'test-novel' or 'universe-1/book-1-the-lamb'). |
backup_path | string | Path under WRITING_SYNC_DIR to a project backup directory, manifest.json, or canonical.snapshot.json. Defaults to project-backups/<project_id>. |
confirm_cross_scope | boolean | Required with dry_run=false when the restore plan changes universe-scoped records. |
confirm_destructive | boolean | Required with dry_run=false when the restore plan includes delete candidates. |
dry_run | boolean | If true (default), validate and summarize the restore plan without writing SQLite state. |
expected_current_snapshot_checksum | string | Required with dry_run=false; pass the current_snapshot_checksum returned by the reviewed dry-run plan to guard against state changes before apply. |
include_unchanged | boolean | If 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().
| Parameter | Type | Description |
|---|---|---|
source_dir * | string | Path to Scrivener external sync folder (the folder that contains Draft/, or Draft/ itself). |
auto_sync | boolean | If true (default), runs sync() after import when not dry-run. |
dry_run | boolean | If true, reports planned writes without changing files. |
ignore_patterns | array | Array of regex patterns matched against filenames. Files matching any pattern are excluded from import. Useful to skip fragments, beat-sheet notes, or feedback files. |
preflight | boolean | If true, returns a list of files that would be processed without doing any work. Use to verify scope before a large import. |
project_id | string | Project 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.
| Parameter | Type | Description |
|---|---|---|
source_dir * | string | Path to Scrivener external sync folder (the folder that contains Draft/, or Draft/ itself). |
auto_sync | boolean | If true, runs sync() after a non-dry-run async import finishes. |
dry_run | boolean | If true, reports planned writes without changing files. |
ignore_patterns | array | Array of regex patterns matched against filenames. Files matching any pattern are excluded from import. |
preflight | boolean | If true, returns a list of files that would be processed without doing any work. |
project_id | string | Project 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.
| Parameter | Type | Description |
|---|---|---|
source_project_dir * | string | Path to a Scrivener .scriv bundle directory. |
auto_sync | boolean | If true, runs sync() after a non-dry-run async merge finishes. |
dry_run | boolean | If true (default), reports planned merges without writing files. |
organize_by_chapters | boolean | If true (default false), relocate scene files into chapter-based folder hierarchies. Chapter metadata is always extracted to sidecars. |
project_id | string | Project ID containing existing sidecars (e.g. 'the-lamb' or 'universe-1/book-1-the-lamb'). |
scenes_dir | string | Absolute 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID (e.g. 'the-lamb' or 'universe-1/book-1-the-lamb'). |
chapter | integer | Optional read-scope compatibility alias resolved through canonical chapter identity. Not a structural mutation target. |
chapter_id | string | Optional canonical chapter identifier. |
confirm_replace | boolean | Must be true when replace_mode=replace. |
dry_run | boolean | If true (default), returns preview results without writing compatibility metadata. |
include_match_details | boolean | If true, include extra match diagnostics per scene. |
max_scenes | integer | Hard guardrail for resolved scene count (default: 200). |
only_stale | boolean | If true, only process scenes currently marked metadata_stale. |
part | integer | Optional part number filter. |
replace_mode | string | merge (default): add inferred IDs; replace: overwrite characters with inferred IDs. |
scene_ids | array | Optional 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.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job ID returned by an async start tool. |
include_result | boolean | If 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.
| Parameter | Type | Description |
|---|---|---|
include_results | boolean | If 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'.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | Job 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.
| Parameter | Type | Description |
|---|---|---|
scene_id * | string | Scene to enrich (e.g. 'sc-011-sebastian'). |
project_id | string | Project 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…
| Parameter | Type | Description |
|---|---|---|
beat | string | Save the Cat beat name (e.g. 'Opening Image'). Matches existing indexed beat values case-insensitively; near matches are suggestions only. |
chapter | integer | Read-scope compatibility alias resolved from canonical chapter sort order. Not a structural mutation target. |
chapter_id | string | Canonical chapter identifier. Requires project_id. Case variants of existing chapter_id values are accepted. Use list_chapters to find valid values. |
character | string | A 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… |
page | integer | Optional page number for paginated responses (1-based). |
page_size | integer | Optional page size for paginated responses (default: 20, max: 200). |
part | integer | Part number (integer, e.g. 1). Chapters are numbered globally across the whole project. |
pov | string | POV character_id, or an unambiguous project-scoped character name when project_id is provided. Use list_characters first to find valid IDs. |
project_id | string | Project ID (e.g. 'the-lamb'). Use to scope results to one project. |
tag | string | Scene 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.
| Parameter | Type | Description |
|---|---|---|
scene_id * | string | The scene_id to retrieve (e.g. 'sc-001-prologue'). Get this from find_scenes or get_arc. |
commit | string | Optional git commit hash to retrieve a past version. Use list_snapshots to find valid hashes. If omitted, returns the current prose. |
project_id | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID (e.g. 'the-lamb'). |
chapter | integer | Read-scope compatibility alias resolved from canonical chapter sort order. Not a structural mutation target. |
chapter_id | string | Canonical 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID. |
find_epigraphs
List canonical epigraphs for a project, optionally narrowed to a canonical chapter_id or read-scope numeric chapter alias.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID. |
chapter | integer | Read-scope compatibility alias resolved from canonical chapter sort order. Not a structural mutation target. |
chapter_id | string | Canonical 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).
| Parameter | Type | Description |
|---|---|---|
character_id * | string | The character_id to trace (e.g. 'char-mira-nystrom'). Use list_characters to find valid IDs. |
page | integer | Optional page number for paginated responses (1-based). |
page_size | integer | Optional page size for paginated responses (default: 20, max: 200). |
project_id | string | Limit 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`).
| Parameter | Type | Description |
|---|---|---|
project_id | string | Limit to a specific project (e.g. 'the-lamb'). |
universe_id | string | Limit 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.
| Parameter | Type | Description |
|---|---|---|
character_id * | string | The 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`).
| Parameter | Type | Description |
|---|---|---|
project_id | string | Limit to a specific project (e.g. 'the-lamb'). |
universe_id | string | Limit 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.
| Parameter | Type | Description |
|---|---|---|
place_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
query * | string | Keyword search terms from indexed metadata (e.g. 'hospital' or a quoted character/place/tag phrase). FTS5 syntax supported. |
page | integer | Optional page number for paginated responses (1-based). |
page_size | integer | Optional 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`).
| Parameter | Type | Description |
|---|---|---|
query * | string | Search terms (e.g. 'vampirism' or 'blood replacement'). FTS5 syntax supported. |
tag | string | Optional exact tag filter. |
type | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
scene_id * | string | Scene ID to inspect. |
project_id | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
doc_id * | string | Reference document ID. |
include_related | boolean | If 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID. |
page | integer | Optional page number for paginated responses (1-based). |
page_size | integer | Optional 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.
| Parameter | Type | Description |
|---|---|---|
thread_id * | string | Thread ID. |
page | integer | Optional page number for paginated responses (1-based). |
page_size | integer | Optional 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 }.
| Parameter | Type | Description |
|---|---|---|
from_character * | string | character_id of the first character (e.g. 'char-sebastian'). |
to_character * | string | character_id of the second character (e.g. 'char-mira-nystrom'). |
project_id | string | Limit 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.
| Parameter | Type | Description |
|---|---|---|
scene_id * | string | Scene ID (e.g. 'sc-011-sebastian'). |
max_apply | integer | Optional cap for how many candidates to apply when mode='apply'. |
min_score | integer | Optional minimum candidate score. Candidates below this are excluded from preview/apply. Defaults to 1. |
mode | string | Use 'preview' (default) to list candidates only, or 'apply' to persist selected suggestions as explicit scene links. |
project_id | string | Optional project scope to disambiguate an ambiguous scene_id across projects. |
selected_doc_ids | array | Optional 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.
| Parameter | Type | Description |
|---|---|---|
name * | string | Display name of the character (e.g. 'Mira Nystrom'). |
fields | object | Optional starter metadata fields for the character sidecar. |
notes | string | Optional starter prose content for sheet.md. |
project_id | string | Project scope for a book-local character (e.g. 'universe-1/book-1-the-lamb' or 'test-novel'). |
universe_id | string | Universe 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.
| Parameter | Type | Description |
|---|---|---|
name * | string | Display name of the place (e.g. 'University Hospital'). |
fields | object | Optional starter metadata fields for the place sidecar. |
notes | string | Optional starter prose content for sheet.md. |
project_id | string | Project scope for a book-local place (e.g. 'universe-1/book-1-the-lamb' or 'test-novel'). |
universe_id | string | Universe 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project the thread belongs to (e.g. 'the-lamb'). |
scene_id * | string | Scene that carries this thread beat (e.g. 'sc-011-sebastian'). |
thread_id * | string | Stable thread ID for the arc being tracked (e.g. 'thread-reconciliation'). |
thread_name * | string | Human-readable thread or arc name. |
beat | string | Optional story beat for this scene in the thread, such as setup, escalation, reveal, reversal, or payoff. |
status | string | Thread status (e.g. 'active', 'resolved'). Defaults to 'active'. |
upsert_thread_link
Compatibility name for track_thread_arc. Prefer track_thread_arc when recording story intent; this retained alias still validates, writes SQLite first, refreshes project backups, and rolls back failed canonical writes.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project the thread belongs to (e.g. 'the-lamb'). |
scene_id * | string | Scene that carries this thread beat (e.g. 'sc-011-sebastian'). |
thread_id * | string | Stable thread ID for the arc being tracked (e.g. 'thread-reconciliation'). |
thread_name * | string | Human-readable thread or arc name. |
beat | string | Optional story beat for this scene in the thread, such as setup, escalation, reveal, reversal, or payoff. |
status | string | Thread status (e.g. 'active', 'resolved'). Defaults to 'active'. |
link_reference_evidence
Link scene, character, place, or reference evidence to a reference document. This is the outcome-level workflow for evidence relationships: SQLite commits first, project backup artifacts refresh after commit, and sidecar/frontmatter compatibility output is refreshed only as generated transparency.
| Parameter | Type | Description |
|---|---|---|
relation * | string | Evidence relationship label (for example: 'informs', 'related', 'history_of'). The value is trimmed and lowercased before validation. |
source_id * | string | Source scene_id, character_id, place_id, or reference doc_id. |
source_kind * | string | Evidence source kind. |
target_doc_id * | string | Target reference doc_id. |
source_project_id | string | Optional project scope for the source. For scene/character/place sources, use this to disambiguate an ambiguous source_id across projects. For reference sources, when provided, it is treated as an own… |
upsert_reference_link
Compatibility name for link_reference_evidence. Prefer link_reference_evidence when recording story evidence; this retained alias still validates, commits SQLite first, refreshes project backups, and treats sidecar/frontmatter output as generated compatibility.
| Parameter | Type | Description |
|---|---|---|
relation * | string | Evidence relationship label (for example: 'informs', 'related', 'history_of'). The value is trimmed and lowercased before validation. |
source_id * | string | Source scene_id, character_id, place_id, or reference doc_id. |
source_kind * | string | Evidence source kind. |
target_doc_id * | string | Target reference doc_id. |
source_project_id | string | Optional project scope for the source. For scene/character/place sources, use this to disambiguate an ambiguous source_id across projects. For reference sources, when provided, it is treated as an own… |
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…
| Parameter | Type | Description |
|---|---|---|
character_id * | string | 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. |
place_id * | string | 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 * | string | Project the scene belongs to (e.g. 'the-lamb'). |
scene_id * | string | Scene that provides the evidence. Prefer canonical scene_id; an unambiguous case-insensitive scene_id or unique scene title in this project is also accepted. |
note | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
character_id * | string | Sheet-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 * | string | Project the scene belongs to (e.g. 'the-lamb'). |
scene_id * | string | Scene that provides the evidence. Prefer canonical scene_id; an unambiguous case-insensitive scene_id or unique scene title in this project is also accepted. |
note | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
place_id * | string | Sheet-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 * | string | Project the scene belongs to (e.g. 'the-lamb'). |
scene_id * | string | Scene that provides the evidence. Prefer canonical scene_id; an unambiguous case-insensitive scene_id or unique scene title in this project is also accepted. |
note | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
from_character * | string | First character_id in the relationship beat. |
project_id * | string | Project the scene evidence belongs to (e.g. 'the-lamb'). |
relationship_type * | string | Relationship label such as trusts, protects, fears, betrays, or reconciles. Trimmed and lowercased before validation. |
scene_id * | string | Scene that provides the evidence for this relationship beat. |
to_character * | string | Second character_id in the relationship beat. |
note | string | Optional short evidence note for this beat. |
strength | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
project_id | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project the chapter belongs to (e.g. 'the-lamb'). |
sort_index * | integer | Canonical chapter order within the project. Must be unused. |
title * | string | Human-readable chapter title. |
chapter_id | string | Optional canonical chapter identifier. If omitted, one is derived from sort_index and title. |
logline | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
chapter_id * | string | Canonical chapter identifier. Use list_chapters to find valid values. |
project_id * | string | Project the chapter belongs to (e.g. 'the-lamb'). |
title * | string | New 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.
| Parameter | Type | Description |
|---|---|---|
chapter_id * | string | Canonical chapter identifier. Use list_chapters to find valid values. |
project_id * | string | Project the chapter belongs to (e.g. 'the-lamb'). |
sort_index * | integer | New 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.
| Parameter | Type | Description |
|---|---|---|
chapter_id * | string | Canonical chapter identifier. Use list_chapters to find valid values. |
epigraph_id * | string | Canonical epigraph identifier. Use find_epigraphs to find valid values. |
project_id * | string | Project 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project the scene belongs to (e.g. 'the-lamb'). |
scene_id * | string | The scene_id to move (e.g. 'sc-011-sebastian'). |
chapter_id | string | Optional canonical chapter identifier. Use list_chapters to find valid values. Omit to keep the current chapter. |
timeline_position | integer | Optional 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.
| Parameter | Type | Description |
|---|---|---|
chapter_id * | string | null | Canonical chapter identifier. Use list_chapters to find valid values. Pass null to clear an explicit chapter link on an unchaptered scene. |
project_id * | string | Project the scene belongs to (e.g. 'the-lamb'). |
scene_id * | string | The 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…
| Parameter | Type | Description |
|---|---|---|
fields * | object | Fields to update. Only supplied keys are changed. |
project_id * | string | Project the scene belongs to (e.g. 'the-lamb'). |
scene_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
character_id * | string | The character_id to update (e.g. 'char-mira-nystrom'). Use list_characters to find valid IDs. |
fields * | object | Fields 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.
| Parameter | Type | Description |
|---|---|---|
fields * | object | Fields to update. Only supplied keys are changed. |
place_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
note * | string | The flag note (e.g. 'Victor knows Mira’s name here, but they haven’t been introduced yet — contradicts sc-006'). |
project_id * | string | Project the scene belongs to (e.g. 'the-lamb'). |
scene_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
profile * | string | Bundle profile: outline_discussion, editor_detailed, or beta_reader_personalized. |
project_id * | string | Project ID to scope the review bundle (e.g. 'test-novel'). |
author_name | string | Optional author name for the cover page (outline_discussion PDF only). |
beta_accountability | boolean | Enable accountability footer + fingerprint metadata for beta_reader_personalized output (default true for beta profile). |
bundle_name | string | Optional output bundle base name override (slugified in planned outputs). |
bundle_title | string | Optional book or document title for the cover page (outline_discussion PDF only). |
chapter | integer | Optional read-scope compatibility alias resolved through canonical chapter identity. Not a structural mutation target. |
chapter_id | string | Optional canonical chapter identifier. |
chapters | array | Optional 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. |
format | string | Planned output format: pdf (default), markdown, or both. Affects planned_outputs filenames only; preview_review_bundle does not render artifacts. |
include_metadata_sidebar | boolean | Rendering option (default false). Echoed in resolved_scope.options for downstream rendering; does not change planning results. |
include_paragraph_anchors | boolean | Rendering option (default false). Echoed in resolved_scope.options for downstream rendering; does not change planning results. |
include_scene_ids | boolean | Rendering 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… |
part | integer | Optional part filter. |
recipient_name | string | Optional recipient display name for beta_reader_personalized profile. |
scene_ids | array | Optional explicit scene_id allowlist. Intersects with other filters. |
strictness | string | Strictness mode: warn (default) or fail. |
tag | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
output_dir * | string | Directory path to write bundle artifacts into. |
profile * | string | Bundle profile: outline_discussion, editor_detailed, or beta_reader_personalized. |
project_id * | string | Project ID to scope the review bundle (e.g. 'test-novel'). |
author_name | string | Optional author name for the cover page (outline_discussion PDF only). |
beta_accountability | boolean | Enable accountability footer + fingerprint metadata for beta_reader_personalized output (default true for beta profile). |
bundle_name | string | Optional output bundle base name override (slugified in filenames). |
bundle_title | string | Optional book or document title for the cover page (outline_discussion PDF only). |
chapter | integer | Optional read-scope compatibility alias resolved through canonical chapter identity. Not a structural mutation target. |
chapter_id | string | Optional canonical chapter identifier. |
chapters | array | Optional 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. |
format | string | Output format: pdf (default), markdown, or both. |
include_metadata_sidebar | boolean | Include metadata sidebar in markdown output (default false). Markdown only — no effect on PDF. |
include_paragraph_anchors | boolean | Include paragraph anchors in markdown output (default false). Markdown only — no effect on PDF. |
include_scene_ids | boolean | Include 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… |
part | integer | Optional part filter. |
recipient_name | string | Optional recipient display name for beta_reader_personalized profile. |
scene_ids | array | Optional explicit scene_id allowlist. Intersects with other filters. |
source_commit | string | Optional explicit source commit for provenance. Defaults to current HEAD when available. |
strictness | string | Strictness mode: warn (default) or fail. |
tag | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
language * | string | Primary writing language. Seeds language-specific defaults. |
overrides | object | Optional overrides layered on top of language defaults. |
overwrite | boolean | If true, replaces an existing config file at the target location. |
project_id | string | Project ID when writing project_root config (e.g. 'the-lamb' or 'universe-1/book-1'). |
scope | string | Config write target scope. Defaults to project_root when project_id is supplied, otherwise sync_root. |
voice_notes | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
project_id | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
project_id | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID to analyze (e.g. 'the-lamb' or 'universe-1/book-1'). |
chapter | integer | Optional read-scope compatibility alias resolved through canonical chapter identity. Not a structural mutation target. |
chapter_id | string | Optional canonical chapter identifier. |
include_scene_signals | boolean | If true, include per-scene detected signals in the response. |
max_scenes | integer | Maximum number of scenes to analyze (default: 50). |
min_agreement | number | Minimum agreement ratio for suggested fields (default: 0.6). |
min_evidence | integer | Minimum number of observed scenes per field before suggesting it (default: 3). |
part | integer | Optional part filter. |
scene_ids | array | Optional 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.
| Parameter | Type | Description |
|---|---|---|
scope * | string | Config scope to update. |
updates * | object | Explicit config field changes to write at the selected scope. |
project_id | string | Project 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.
| Parameter | Type | Description |
|---|---|---|
scope * | string | Config scope to preview updates for. |
updates * | object | Explicit config field changes to preview at the selected scope. |
project_id | string | Project 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project ID to analyze (e.g. 'the-lamb' or 'universe-1/book-1'). |
chapter | integer | Optional read-scope compatibility alias resolved through canonical chapter identity. Not a structural mutation target. |
chapter_id | string | Optional canonical chapter identifier. |
include_clean_scenes | boolean | If true, include scenes with no detected drift in scene_results. |
max_scenes | integer | Maximum number of scenes to analyze (default: 50). |
min_agreement | number | Minimum agreement ratio for suggested updates (default: 0.6). |
part | integer | Optional part filter. |
scene_ids | array | Optional 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.
| Parameter | Type | Description |
|---|---|---|
boot_files_overwrite | boolean | If true, rewrites existing boot files instead of in-place updates. |
overwrite | boolean | If true, replaces an existing skills/prose-styleguide/SKILL.md file. |
project_id | string | Project-scoped skill generation is unsupported because this tool writes a shared sync-root skills/prose-styleguide/SKILL.md file. |
publish_boot_files | boolean | If 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.
| Parameter | Type | Description |
|---|---|---|
instruction * | string | A brief instruction for the edit (e.g. 'Tighten the opening paragraph'). Used in the git commit message. |
revised_prose * | string | The complete revised prose text for the scene. |
scene_id * | string | The scene_id to revise (e.g. 'sc-011-sebastian'). |
bypass_reason | string | Required when bypass_styleguide=true. Explains why this edit should ignore styleguide checks. |
bypass_styleguide | boolean | If true, bypasses automatic styleguide checks for this proposal. |
project_id | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
proposal_id * | string | The proposal_id returned by propose_edit. |
scene_id * | string | The scene_id being revised. |
project_id | string | Optional 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.
| Parameter | Type | Description |
|---|---|---|
proposal_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
project_id * | string | Project the scene belongs to. |
reason * | string | A brief reason for the snapshot (e.g. 'Character arc milestone reached'). |
scene_id * | string | The 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.
| Parameter | Type | Description |
|---|---|---|
scene_id * | string | The scene_id to list snapshots for. |
project_id | string | Optional 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.