---
title: "Refine Characters Endpoint"
method: POST
path: "/api/mcp/refine_characters"
tags: ["mcp"]
---

# Refine Characters Endpoint

`POST /api/mcp/refine_characters`

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

Generate a refined character list from the conversation so far.
Pass `messages` plus a synthesis instruction (e.g. "based on our
discussion, update the cast").

  apply=false: returns reply.updated_cast for preview.
  apply=true: atomically commits. Use when the user says "go ahead".

Returns {editorial_summary, reply.{short_reply, long_reply,
updated_cast}, applied, character_count}.

## Request body

- RefineCharactersInput
  - `job_id` string, required: The story job ID.
  - `message` string, required
  - `messages` PlanMessage[]
    - `role` string, required
    - `content` string
    - `plan` object, nullable
    - `cover` object, nullable
    - `writer_thinking` string, nullable
    - `writer_thinking_data` object, nullable
    - `metadata` object, nullable
    - `type` string, nullable
    - `applied_at` string, nullable
    - `applied_revision` integer, nullable
    - `applied_status` string, nullable
  - `model` string, nullable
  - `apply` boolean: If true, atomically commit the refined cast (like calling update_characters with the returned cast in one step).

## 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)
