mcp

Write Chapter

Write one unwritten chapter by number, possibly out of order.

Differs from resume_writing in that the caller picks which chapter instead of always starting from the lowest unwritten one. Useful when the user wants to attempt a later chapter after an earlier one failed (e.g. an LLM safety rejection) and they don't want to re-trigger the failing chapter first.

Refused (409) when the chapter has no outline, is already written, or another writing/revision job is in flight.

post/api/mcp/write_chapter

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/write_chapter
  • Auth: none declared

Request body

job_idstring required

The story job ID.

authoring_mode'server' | 'client' nullable

Set to 'client' to have write_chapter return a no-LLM chapter brief or commit client-authored text.

server_llmboolean nullable

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

titlestring nullable

Optional title when committing client-authored chapter text.

textstring nullable

Client-authored chapter prose to commit through write_chapter in client mode.

summarystring nullable

Short client-authored chapter summary for future briefs.

handoffstring nullable

End-of-chapter continuity handoff for future briefs.

beatsobject[]

Optional beat plan that drove this client-authored chapter.

carry_forward_factsstring[]

Continuity facts the client wants carried forward.

open_loops_startedstring[]

Open loops introduced by this chapter.

open_loops_resolvedstring[]

Open loops resolved by this chapter.

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 chapter artifacts.

plan_idstring nullable

Selected initial chapter plan id to consume when writing this unwritten chapter.

dry_runboolean

Preview the missing-chapter write inputs without starting a writer job or committing prose.

chapterinteger required

Chapter number to write. Must exist in the outline and not already have written prose. Skips chapters earlier in the outline that are still unwritten — the writer's continuity ledger is built only from chapters that already have text.

Response

Successful Response

job_idstring nullable
statusstring nullable
story_urlstring nullable
chapterinteger nullable
kindstring nullable

Changes

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