---
title: "Attach Article Research"
method: POST
path: "/api/mcp/attach_article_research"
tags: ["mcp"]
---

# Attach Article Research

`POST /api/mcp/attach_article_research`

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

Attach Codex/Claude research to an article job.

Default server mode stores the handoff, writes the first draft with
the server article writer, and returns the review URL. Client mode
(`authoring_mode="client"` or `server_llm=false`) stores the handoff
and returns a no-server-LLM drafting brief; call this same tool again
with `base_text_hash` and `text` to commit the client-authored draft.

## Request body

- AttachArticleResearchInput
  - `job_id` string, required: The story job ID.
  - `research_brief` union: Research handoff from Codex/Claude to the article writer. Prefer a single plain text or Markdown string whose authored format should be preserved by the website: one summary paragraph, bullets when useful, and source links inline. A legacy object is accepted for compatibility.
    - string
    - object
  - `authoring_mode` 'server' | 'client', nullable: Set to 'client' to store the research and return a no-server-LLM drafting brief, or to commit client-authored Markdown when text is supplied.
  - `server_llm` boolean, nullable: Set false as an alias for authoring_mode='client'. Do not send model in this mode.
  - `base_text_hash` string, nullable: Hash returned by the client drafting brief; required when submitting client-authored text.
  - `text` string, nullable: Client-authored full article Markdown to commit in client mode.
  - `client_name` string: Client identity for no-LLM provenance.
  - `client_model` string, nullable: Client-side model name for no-LLM provenance. Never used for server API calls.
  - `artifact_version` string: Version label for submitted client article drafts.

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