# answer.cloud MCP: CMS Tools

> Canonical source: [answer.cloud MCP: CMS Tools](https://www.answer.cloud/docs/mcp-cms-tools-hosted/)

Define collections and author content: list/upsert collections, list/get/upsert/preview/publish/archive/delete entries, and republish_cms, plus templates, markers, and the publish prerequisite.

## Organization selection

Use browser OAuth for the normal interactive connection. Run `list_organizations` when the organization is not established; ask the user to choose if several are available. Include the selected `organization_id` on subsequent calls when required by the connection, including the tools listed below.

These answer.cloud MCP tools manage CMS collections and entries — the structured, editable content that renders into pages, indexes, `.txt` mirrors, `llms.txt`, and `sitemap.xml`. They let an agent define a collection and then author, preview, publish, archive, or delete entries. For deploying the site itself, see the site & deploy tools page; for connection and auth, see the MCP overview.

CMS tools are organization- and site-scoped like the deploy tools, but they do **not** consume the daily deploy quota.

## Before publishing Answer Cloud pages

A site must have gone live with at least one deploy before you can publish CMS entries. Publishing against a site that has never deployed returns `cms_no_live_deploy`. Define collections and draft entries any time; publish after the first live deploy.

## How templates work

Each collection renders through a `show` template (single entry) and an `index` template (the listing). Templates are shipped inside the deploy artifact under `.aeo/cms/{collection_key}/show.html` and `index.html`, keyed by collection. A `show` template must contain the `<!-- aeo:content -->` marker; an `index` template must contain `<!-- aeo:entries -->`. If a template is missing or lacks its marker, answer.cloud renders the entry with a built-in fallback theme and records a warning. Other supported markers include `<!-- aeo:title -->`, `<!-- aeo:summary -->`, `<!-- aeo:published_at -->`, `<!-- aeo:collection_name -->`, and `<!-- aeo:collection_summary -->`.

## list_cms_collections

List the site's collections and their health.

- **Arguments:** `site_slug`
- **Returns:** `collections[]` with `key`, `name`, `description`, `index_path`, `path_pattern`, `item_type`, `template_path`, `index_template_path`, `template_health` (`healthy` or `missing` for `show` and `index`), and `entries_count` / `published_count` / `draft_count`.

## upsert_cms_collection

Create or update a collection.

- **Arguments:** `site_slug`, `key` (required); optional `name`, `description`, `index_path`, `path_pattern`, `item_type`, `fields[]`, `sort` (`{ field, direction }`), and templates via either `templates: { show, index }` or the flat `template_path` / `index_template_path`.
- **Returns:** the collection view.
- **Notes:** `key` identifies the collection and maps to its template folder. `path_pattern` must include `{slug}`. This tool records the collection's shape; the actual template HTML is installed by a deploy that ships the matching `.aeo/cms/{key}/**` files.

## list_cms_entries

List entries in a collection.

- **Arguments:** `site_slug`, `collection_key`; optional `status` (`all`, `draft`, `published`, `archived`), `query`
- **Returns:** `entries[]` with `id`, `title`, `status`, `has_unpublished_changes`, `source_path`, `live_url`, `preview_url`, and timestamps. `query` matches entry title and content.

## get_cms_entry

Fetch one entry in full.

- **Arguments:** `site_slug`, `collection_key`, `entry_id`
- **Returns:** the entry plus its `published_payload`, any `draft_payload`, and AEO status.

## upsert_cms_entry

Create or update an entry.

- **Arguments:** `site_slug`, `collection_key`; optional `entry_id` (omit to create a new entry); content fields `title`, `slug`, `summary`, `content`, `published_at`, `metadata`; and `save_mode` — `draft` (default) or `publish`.
- **Returns:** the entry detail for drafts, or the publish result when `save_mode` is `publish`.
- **Notes:** by default this saves a **draft**, not a live page — you then publish separately. If a `publish` save fails to render, the draft is preserved and the response returns the entry ID so you can fix and retry.

## preview_cms_entry

Get a private preview of a staged draft.

- **Arguments:** `site_slug`, `collection_key`, `entry_id`
- **Returns:** a private `preview_url` hosted on answer.cloud and the template status. It does not return raw HTML.
- **Notes:** use this to review a draft before publishing.

## publish_cms_entry

Publish an entry to the live site.

- **Arguments:** `site_slug`, `collection_key`, `entry_id`
- **Returns:** the entry, its `live_url` and `index_url`, and `written_paths[]` — the entry HTML and `.txt`, the collection index HTML and `.txt`, plus refreshed `llms.txt` and `sitemap.xml`.
- **Notes:** publishing renders the entry, updates the collection index, writes plain-text mirrors, refreshes discovery files, and injects JSON-LD and the chat widget. If the entry's path collides with an existing artifact file, it returns `cms_path_collision` — choose another slug or path.

## archive_cms_entry

Unpublish an entry while keeping it recoverable.

- **Arguments:** `site_slug`, `collection_key`, `entry_id`
- **Returns:** the updated entry status and `changed_paths[]`. The collection index is re-rendered without the entry.

## delete_cms_entry

Permanently delete an entry.

- **Arguments:** `site_slug`, `collection_key`, `entry_id`
- **Notes:** this is irreversible. To take a page down but keep the content, use `archive_cms_entry` instead.

## republish_cms

Re-render published entries and indexes into the current deploy.

- **Arguments:** `site_slug`; optional `collection_key`
- **Returns:** the refreshed collections.
- **Notes:** run this after changing templates so existing published content picks up the new markup. Scope it to one collection with `collection_key`, or refresh everything by omitting it.

## A typical authoring loop

1. `list_cms_collections` to confirm the collection exists and its templates are healthy.
2. `upsert_cms_entry` with `save_mode: "draft"` to stage content.
3. `preview_cms_entry` to review the staged draft privately.
4. `publish_cms_entry` to go live.
5. `archive_cms_entry` to take something down later, or `republish_cms` after template changes.

## Frequently asked questions

### Why didn't my entry appear on the site after upsert_cms_entry?

Because `upsert_cms_entry` defaults to `save_mode: "draft"`. Call `publish_cms_entry` (or pass `save_mode: "publish"`) to make it live.

### My pages render unstyled or generic. Why?

The collection's template is missing or lacks its required marker, so answer.cloud used the fallback theme. Ship `.aeo/cms/{key}/show.html` and `index.html` (with `<!-- aeo:content -->` and `<!-- aeo:entries -->`) in a deploy, then run `republish_cms`.

### Do CMS operations use my daily deploy quota?

No. CMS tools are exempt from the deploy quota, though they do count toward the per-minute request rate.

## Connected Webflow publishing

`upsert_cms_collection` also accepts `publish_to_webflow`. When enabled, entries publish to the connected Webflow CMS rather than generating Answer Cloud HTML. Inspect the collection’s publishing destination and configured connection before publishing. Answer Cloud template and live-deploy prerequisites above describe the Answer Cloud rendering path; connected Webflow publication has its own destination and connection prerequisites. Do not assume every collection publishes to both hosts.