Patch block content
patch_block_contentApply surgical edits to one string in a block's localized content without resending the full content. Use unique markers to insert, replace a section, or replace the whole value.
Instructions
Apply surgical edits (insert_before/insert_after/replace_section, or replace_all to set the whole string, given the value it replaces) to one string in a block's localized content without re-sending the full content - including a string nested in a list or object, via a dotted fieldPath such as 'tabs.0.label'. Each marker must match exactly once. 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 unless the page already stores that block - 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>",
"locale": "<locale>",
"operations": "<operations>"
},
"name": "patch_block_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| locale | Yes | Language code, e.g. 'en' (see get_site_config) | |
| pageId | Yes | Page id or slug | |
| blockId | Yes | Content block instance id (layout blocks not supported) | |
| fieldPath | No | String field inside content[locale] to patch (default: 'content'). Dot segments reach a nested string, e.g. 'tabs.0.label' for the first item's label | |
| operations | Yes | Ordered list of patch operations (applied in order) | |
| expectedVersion | No | Optimistic-concurrency guard: the `version` get_page returned |