mcp

Revise Paragraph

Revise a single paragraph in-place. The user selects a paragraph by index (0-based, split on double-newline) and provides a note describing the desired change. Only the target paragraph is rewritten; the rest of the chapter is preserved byte-for-byte. Use this for one paragraph that needs reflow, voice, localized logic, or characterization. If adjacent paragraphs or a beat/scene range also need to change, use the selected paragraph chat/finalize/apply flow instead. Costs 1 credit.

post/api/mcp/revise_paragraph

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

Request body

job_idstring required

The story job ID.

chapterinteger required

Chapter number to revise a paragraph in.

paragraph_indexinteger required

0-based index of the paragraph (split on double-newline) the user selected.

notestring required

User's revision note for this paragraph.

modelstring nullable

Model override (e.g. 'grok-4').

base_revisioninteger nullable

Which revision number to revise from. None = latest.

authoring_mode'server' | 'client' nullable

Set to 'client' to use the caller's own model. Without revised_paragraph, returns a no-LLM paragraph rewrite brief; with revised_paragraph and base_text_hash, commits the client-authored paragraph without a server LLM call.

server_llmboolean nullable

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

base_text_hashstring nullable

Full chapter text hash returned by the client paragraph brief; required when committing revised_paragraph.

revised_paragraphstring nullable

Client-authored replacement for exactly the selected paragraph. Must not contain a double-newline paragraph break.

dry_runboolean

Validate revised_paragraph without committing.

commitboolean nullable

Set false as an alias for dry_run=true; only true/default commits.

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

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.