mcp

Chapter Chat

Conversational reply for back-and-forth in the revise panel.

Use this on every user-typed message. Returns a short free-text editor response — questions answered, ideas brainstormed, critique given, suggested changes described — WITHOUT generating a structured plan. The UI shows a "Ready for plan?" button after each reply; clicking that calls plan_revision with the full conversation to synthesize the plan.

Returns: {chapter: int, editorial_summary: str}

post/api/mcp/chapter_chat

Request

  • Base URL: https://writer.swapp1990.org (the document declares no server; this is the origin it was published from)
  • URL: https://writer.swapp1990.org/api/mcp/chapter_chat
  • Auth: none declared

Request body

job_idstring required

The story job ID.

chapterinteger required
messagestring required

User message — question, brainstorm, or revision instruction.

modelstring nullable

Model override.

revisioninteger nullable

Which revision to use as context. None = latest.

use_story_toolboolean

If true, run the chat as an agentic tool-use loop so the model can call the story-query tool (semantic search / read by address) over the whole story mid-conversation. Live models only; default false.

target_wordsinteger nullable

Target word count for the revised chapter. The planner uses this to size beats appropriately — without it, the planner defaults to the base chapter's current length, which produces beats that are too small when the user wants a meaningfully longer rewrite.

authoring_mode'server' | 'client' nullable

Set to 'client' to have plan_revision return a no-LLM planning brief or commit client_plan.

server_llmboolean nullable

Set false as an alias for authoring_mode='client'. Do not send model in this mode.

base_text_hashstring nullable

Hash returned by the no-LLM plan_revision brief; required when submitting client_plan.

scope'chapter' | 'paragraph' | 'range'

Client revision-planning scope.

paragraph_indexinteger nullable

0-based paragraph index for client paragraph-scope revision planning.

paragraph_rangeinteger[] nullable

0-based inclusive [start, end] paragraph range for client range-scope revision planning.

include_full_textboolean

Client mode only: include full current chapter text in the planning brief instead of the compact context excerpt.

revision_mode'surgical' | 'scene_rewrite' | 'full_rewrite' nullable

Client-declared revision mode for client_plan provenance.

plan_purpose'revision' | 'as_written_rebaseline' nullable

Purpose of a submitted client revision plan.

supersedes_plan_idstring nullable

Prior immutable plan artifact superseded by this rebaseline.

client_namestring

Client identity for no-LLM provenance.

client_modelstring nullable

Client-side model name for no-LLM provenance. Never used for server API calls.

artifact_versionstring

Version label for submitted client_plan artifacts.

auto_saveboolean

If true (default), the server appends user+assistant turns to the chapter's chat history so get_chat returns them next call. Chat clients that manage history themselves can pass false.

request_idstring nullable

Client-supplied idempotency key. If the same id is sent again within the cache TTL, the server returns the original response without re-running the LLM. Lets mobile clients retry a backgrounded request without losing the reply or spending the model call again.

Response

Successful Response

story_urlstring nullable
article_urlstring nullable
job_idstring nullable
statusstring nullable
is_terminalboolean nullable

Changes

No recorded changes to this operation across all 1 revision of this API.