wp_update_block
Replaces a Gutenberg block at a given index in a post with new block markup.
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": {
"site_id": "<site_id>",
"post_id": "<post_id>",
"block_markup": "<block_markup>"
},
"name": "wp_update_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Raw block-tree path returned by wp_list_blocks. Use this for nested blocks. | |
| index | No | Zero-based index of the block to replace. | |
| post_id | Yes | The post ID containing the block. | |
| site_id | Yes | The connected site's id returned by list_sites. Call list_sites first; do not use a URL or WordPress post ID. | |
| block_markup | Yes | The new block markup (HTML with Gutenberg block comments, e.g. <!-- wp:paragraph --><p>Hello</p><!-- /wp:paragraph -->). |