---
title: "Set Location Reference"
method: POST
path: "/api/mcp/set_location_reference"
tags: ["mcp"]
---

# Set Location Reference

`POST /api/mcp/set_location_reference`

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

Persist or update a reusable Writer location reference from a D4U asset.

## Request body

- SetLocationReferenceInput
  - `job_id` string, required: The story job ID.
  - `location_name` string, required: Story location name, such as Paresh Shah cabin.
  - `design_id` string, required: Durable DesignForYou design id, e.g. dsg_25627817.
  - `url` string, nullable: Optional durable asset URL returned by DesignForYou.
  - `location_reference_id` string, nullable: Optional stable Writer id. Omit to derive one from location_name.
  - `location_label` string, nullable: Optional label passed to DesignForYou as a context label.
  - `prompt` string, nullable: Prompt used to generate or choose this location reference.
  - `model` string, nullable: Image model that produced the reference.
  - `template_id` string, nullable: DesignForYou template id that produced the reference.
  - `prompt_strategy` string, nullable: Writer location-reference prompt strategy, if known.
  - `session_id` string, nullable: DesignForYou session id, if known.
  - `provider` string, nullable: Image provider, if known.
  - `request_id` string, nullable: DesignForYou/Writer request id, if known.
  - `source_job_id` string, nullable: Transient asset job id that produced the reference, if known.
  - `result` object, nullable: Optional generated asset result from get_asset_status.
  - `replace_existing` boolean: Replace an existing reference with the same id, name, or design_id.

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