update_content
Save the working draft of a content item: merge field updates by default, or pass merge:false with a revision to replace the map and avoid overwriting concurrent edits.
Instructions
Save the working draft of a content item. data maps field name → value. For LONG text/markdown values prefer set_field: a flat string parameter survives tool-call serialization that can mangle long strings nested inside data. IMPORTANT: each field's value shape depends on its content-type field TYPE — call get_content_type first. text/markdown → a plain string; richtext → a TipTap doc object {type:'doc',content:[…]}; contentArea → an ARRAY of block instances; reference → {documentId,type?}; select → one option-value string; image → an asset id. By default data is MERGED over the current draft — fields you omit are kept. Pass merge:false to REPLACE the whole map (then you must send every required field, or the next publish will fail validation). With merge:false, also pass the revision you got from get_content: the write is then refused (409) if a human editor changed the draft meanwhile, instead of overwriting them. Merged writes don't need it — they read current data at write time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Field name → value, shaped per get_content_type's valueFormat. Pass {} to change only name/slug/displayInNav. | |
| name | No | New display name. Omit to keep it. | |
| site | No | Site slug or id to act in (multisite). Omit to use this server's default site. Call list_sites to see what exists — an empty tree or search usually means the wrong site, not missing content. | |
| slug | No | New URL slug for a page; publishing it adds a 301 from the old URL automatically. Omit to keep it. | |
| merge | No | Default true: shallow-merge data over the current draft. false = replace the whole field map | |
| locale | No | Locale code. Omit for the document's own locale (its site-default variant, else its only variant). | |
| revision | No | Optimistic concurrency: the `revision` from get_content. If a human (or another agent) has changed the draft since, the write is refused instead of overwriting their work. Recommended whenever merge:false | |
| documentId | Yes | The item's documentId (stable across locales and versions), e.g. from tree, list_pages or get_content. | |
| displayInNav | No | Whether the page appears in the site navigation. Omit to keep it. | |
| allowLanguageMismatch | No | Set true ONLY to deliberately write text whose language differs from the locale branch (the guard otherwise refuses, so e.g. Norwegian text can't silently land on the 'en' branch) |