---
title: "Update World"
method: POST
path: "/api/mcp/update_world"
tags: ["mcp"]
---

# Update World

`POST /api/mcp/update_world`

## 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/update_world`
- Auth: none declared

Low-level direct replacement of the world/setting doc.

Prefer refine_world(apply=true) for conversational edits — this
endpoint is for inline UI edits and programmatic overwrites.
Empty string is allowed (clears the doc).

Valid in any state. Edits made after writing has started apply
to future revisions only — already-written chapter text is not
retouched.

## Request body

- UpdateWorldInput
  - `job_id` string, required: The story job ID.
  - `setting_doc` string, required: Replacement setting/world markdown document. Overwrites plan.setting_doc verbatim. Empty string is allowed (clears the world doc — refine_world or regenerate_setting can rebuild it later).

## Response `200`

Successful Response

- GenericToolResponse: Fallback for tools whose payload is still being tightened.
  - `story_url` string, nullable
  - `article_url` string, nullable
  - `job_id` string, nullable
  - `status` string, nullable
  - `is_terminal` boolean, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/swapp1990/apis/writeforyou-mcp-api.md) · [All operations](https://skmtc.dev/swapp1990/apis/writeforyou-mcp-api/llms.txt) · [OpenAPI document](https://skmtc.dev/swapp1990/apis/writeforyou-mcp-api/revisions/ce5e2a89ab4d?raw)
