Skip to content
Documentation
Browse docs
reference

CMS tools

Use collection and entry tools with exact scope, draft and publication behavior, template requirements, destination differences, and returned fields.

Reviewed

CMS tools manage collections and entries within an organization and site. They do not consume deployment starts, but they count toward MCP request limits. Every tool accepts organization_id when selection requires it.

Collection tools#

Tool Required arguments Optional arguments Returns
list_cms_collections site_slug string — collections[] with schema/path/template summary and counts.
upsert_cms_collection site_slug, key string name, description, index_path, path_pattern, template_path, index_template_path, templates, item_type, publish_to_webflow, fields, sort Collection view.

Strings are used for names and paths. publish_to_webflow is boolean. fields is an array of field objects. sort is an object with field and direction. templates accepts string paths show and index; explicitly supplied nested values take precedence over corresponding flat paths.

{
  "site_slug": "example-site",
  "key": "guides",
  "name": "Guides",
  "index_path": "/guides/",
  "path_pattern": "/guides/{slug}/",
  "templates": {
    "show": ".aeo/cms/guides/show.html",
    "index": ".aeo/cms/guides/index.html"
  },
  "fields": [
    { "key": "title", "type": "string", "required": true },
    { "key": "summary", "type": "text" },
    { "key": "content", "type": "markdown", "required": true },
    { "key": "published_at", "type": "datetime" }
  ],
  "sort": { "field": "published_at", "direction": "desc" }
}

This records a collection definition; it does not upload template files. Deploy matching private templates separately. For a companion, inventory its real collections first and create new ones only when that content model is explicitly intended.

Collection views include key, name, description, index_path, path_pattern, item_type, publish_destination, webflow_collection_id, template paths/health, entries_count, published_count, and draft_count. The destination is answer_cloud or webflow; Webflow templates can be marked not_required.

Entry tools#

All entry tools require site_slug and collection_key strings. Tools operating on one existing entry also require numeric entry_id.

Tool Additional arguments Returns
list_cms_entries Optional status: all/draft/published/archived; query string entries[], ordered by most recently updated.
get_cms_entry Required entry_id Summary, published_payload, optional draft_payload, aeo status.
upsert_cms_entry Optional entry_id, title, slug, summary, content, published_at, metadata, save_mode Saved entry detail or publication result.
preview_cms_entry Required entry_id Private preview_url, template_status.
publish_cms_entry Required entry_id entry, live_url, index_url, written_paths; webflow_item_id for Webflow.
archive_cms_entry Required entry_id entry, changed_paths.
delete_cms_entry Required entry_id deleted, entry_id, collection_key, changed_paths.
republish_cms Requires site_slug; optional collection_key Updated collection inventory.

Content fields are strings except metadata, an object. save_mode accepts draft or publish and defaults to draft. Omit entry_id only when creating an entry; preserve the returned ID on retries. published_at is a date/time string. Query matches titles/content; a list is a summary, not the full published body.

Entry summaries contain id, title, status, has_unpublished_changes, source_path, webflow_item_id, live_url, preview_url, updated_at, and published_at. The summary title can reflect an unpublished draft, so inspect published_payload when verifying the live text.

{
  "site_slug": "example-site",
  "collection_key": "guides",
  "title": "Connect your first site",
  "slug": "first-site",
  "summary": "Choose and verify the correct publishing target.",
  "content": "<h2>Choose the target</h2><p>Inspect your existing sites first.</p>",
  "save_mode": "draft"
}

Send this to upsert_cms_entry, then preview and publish the returned ID. A failed publish attempt preserves the saved draft and includes its entry ID in the error message; do not create a duplicate to retry.

Publication prerequisites and effects#

Answer Cloud rendering requires an initial live deploy. Missing it returns cms_no_live_deploy. The collection's show template needs <!-- aeo:content -->; its index template needs <!-- aeo:entries -->. Other markers include title, summary, published_at, collection_name, and collection_summary. Missing templates/markers can produce fallback styling and warnings.

Publication updates the entry HTML and Markdown mirror, collection index, discovery files, JSON-LD, and configured widget. A static artifact occupying a CMS path can cause cms_path_collision; remove the collision from source or intentionally choose another path.

Archive removes public content while preserving a recoverable record. Delete destroys the entry after public removal and is irreversible. Neither operation is a complete account-data deletion request.

republish_cms reapplies published content after template changes. With collection_key, Webflow publication is scoped to that collection; the current Answer Cloud HTML re-render can refresh all HTML collections in the live deploy. Do not assume it is a content rollback or a strict single-collection change.

Connected Webflow publication uses its configured external destination and connection prerequisites. It does not generate an Answer Cloud index_url or written paths for that entry. Inspect the destination before publishing and verify the actual external result.

See CMS templates, publishing, and content recovery.

Have a question about this guide?

Send feedback

Type to find a guide.