Update a CMS item
update_itemChanges one item: values (only the ones you send; null or "" clears one), newSlug (renames the file and its URL), draft (false publishes it with the site), publishedAt, order. Checked against the fields like create_items; a wrong type is refused with the field and why. With locale (a language from list_locales): writes that language's translation of the item instead (content//..md): values for translatable fields only (shared fields are refused: they are the same in every language), newSlug as the item's slug in that language, draft as that language's publish state (a new translation is a draft unless draft is false); publishedAt and order can't take a locale. Translate only when the user asks. Writes go to the branch the workspace has open, the same as the Content tab. Saved at once, like every edit in Xodia; pushing to Git and publishing stay the user's. 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>",
"slug": "<slug>",
"projectId": "<projectId>"
},
"name": "update_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The item to change | |
| draft | No | false publishes it with the site. With locale: this language's publish state | |
| order | No | ||
| branch | No | Optional branch; default the branch the workspace has open | |
| locale | No | Optional: a language code from list_locales (not the default) to read or write the item in that language; leave out for the default language | |
| values | No | Changed values only; null or "" clears one. With locale: translatable fields only | |
| newSlug | No | Renames the item (its URL changes: add a redirect when it was published). With locale: the item's slug in that language only | |
| projectId | Yes | Project id from list_projects | |
| collection | Yes | The collection id (its folder under content/), from list_collections | |
| publishedAt | No |