Update block content
update_block_contentUpdate a specific block's content on a page by merging changes or replacing the whole content. Use it to edit content and layout blocks, then correct and resave if block warnings appear.
Instructions
Update a specific block's content on a page. Defaults to merging with existing content; pass mode: 'replace' to overwrite the block's whole content. Works for content and layout blocks. If the result includes blockWarnings, the saved content violates the workspace block manifest (unknown field, wrong value shape, or a stored block whose type is no longer registered) - correct the content and save again, unless the warning is about a stored block whose type is no longer registered: that one is a manifest problem, so restore or sync the type, or find the block with list_block_usage and migrate or remove it. When the warnings also say when the workspace block manifest was last synced, the field or type may simply be newer than the manifest: if the site's code declares it, keep the content and sync the manifest (cmssy sync-manifest in the site's repo) instead. A block whose type the workspace block manifest does not register is refused on the shared draft unless the page already stores that block - compose types that are not deployed yet in target: 'devDraft' and promote once the code ships; pick registered types from list_block_types.
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": {
"pageId": "<pageId>",
"blockId": "<blockId>",
"content": "<content>"
},
"name": "update_block_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'merge' (default) shallow-merges the given content per language into what's already there. 'replace' sets the block's entire content to exactly what you provide, dropping any language or field you don't include - use it to fix legacy/malformed content (e.g. a repeater stored as an object instead of an array). | |
| pageId | Yes | Page id or slug | |
| target | No | 'draft' (default) edits the shared page draft. 'devDraft' edits YOUR per-user dev draft overlay (owned by the token's user; starts from the current page blocks when no overlay exists) - for block types not deployed yet; promote with promote_dev_draft. | |
| blockId | Yes | Block instance id (UUID) to update | |
| content | Yes | Content keyed by language, e.g. { en: { title: 'New Title' } }. In 'merge' mode only the given fields change; in 'replace' mode this becomes the block's entire content. A relation field stores record id(s) from list_records - a single id string (hasOne) or an array of id strings (hasMany); the delivery API resolves them to records at render time. A relation field with mode 'all' stores no value. | |
| settings | No |