mcp

Selected Paragraph Apply Plan

Apply an approved selected-paragraph chat plan.

Product-facing replacement for the old note apply action. It uses a dedicated selected-paragraph segment writer: approved plan, cast/world, beat description, and the target paragraphs only. Use it for scoped local prose work across one selected paragraph plus nearby paragraphs, or a small beat/scene range. If the range or intent is unclear, call get_selected_paragraph_context, continue_selected_paragraph_chat, and finalize_selected_paragraph_chat first; if the user already supplied a clear range and final plan, pass force_range directly here.

post/api/mcp/paragraph_apply

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

Request body

job_idstring required

The story job ID.

chapterinteger required

Chapter number containing the selected paragraph.

paragraph_indexinteger required

0-based selected paragraph index.

final_planstring required

Final writer-facing plan approved by the user.

planobject nullable

Structured selected-paragraph plan containing range and rationale.

force_rangeinteger[] nullable

Approved [start, end] paragraph range to apply.

base_revisioninteger nullable

Revision number to revise from. None = latest.

modelstring nullable

Model override.

selected_textstring nullable

Selected paragraph text captured when the chat plan was approved.

selected_text_hashstring nullable

Client hash of selected paragraph text captured when the chat plan was approved.

authoring_mode'server' | 'client' nullable

Set to 'client' to use the caller's own model. Without revised_paragraphs, returns a no-LLM beat/range rewrite brief; with revised_paragraphs and base_text_hash, commits the client-authored approved range 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 selected-paragraph brief; required when committing revised_paragraphs.

revised_paragraphsstring[] nullable

Client-authored replacement paragraphs for the approved range. Selected-paragraph rewrites may replace the approved range with fewer, the same number, or more non-empty paragraphs when that implements the approved plan; an empty array is valid only for an approved delete_paragraph plan with expected output count 0.

dry_runboolean

Validate revised_paragraphs 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 selected-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.