Update a CMS collection
update_collectionChanges a collection: settings (name, singular, plural, urlFolder, which moves the item pages with their route, the links to them and redirects for published ones, reservedSlugs, sort, manualOrder, groups, translatable and translatedOnly for the site's languages), collection page settings (page: SEO title and description templates with {field} tokens, Open Graph, canonical, noindex, JSON-LD, custom code) and fields: add, update (label, required, help, options, reference target, validation, default, translatable), rename (moves the key in every item, the page settings and code bindings of files that name the collection, in one reviewable change), reorder (every id) and delete (refused when items hold values unless allowDataLoss: ask the user first). dryRun counts what rename and delete would touch. Parts run in that order; each part that fails is listed and the rest still apply. Writes go to the branch the workspace has open as unsaved changes the user reviews and saves in Xodia, the same as the Content tab. Works on every plan within its collection and item limits (Free: 2 collections and 100 items a site); turning a folder into a Xodia collection needs a paid plan.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"collection": "<collection>",
"projectId": "<projectId>"
},
"name": "update_collection"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Collection page settings: titleTag and metaDescription templates with {field} tokens ("{title} | Blog", "{summary}"; system tokens slug, createdAt, updatedAt, publishedAt, "|date" formats a date), ogTitle and ogDescription ("sameAsSeo" or a template), ogImageField (an image field id), canonical, noindex (true or a switch field id), jsonLd {preset: article, product, event, jobPosting or custom, template}, customCode {head, bodyEnd} with tokens (values HTML-escaped). Replaces the whole page object; null clears it | |
| branch | No | Optional branch; default the branch the workspace has open | |
| dryRun | No | Only count what rename and delete would change; writes nothing | |
| fields | No | ||
| settings | No | ||
| projectId | Yes | Project id from list_projects | |
| collection | Yes | The collection id (its folder under content/), from list_collections | |
| allowDataLoss | No | Deleting a field that items have values in is refused unless this is true. Ask the user first |