Write blocks
wp_write_blocksWrite block editor content to an existing post from a list of block specs. Types and fields: paragraph (content), heading (content, level 1-6), list (items, ordered), quote (content, citation), image (url, alt, caption), buttons (buttons: text, url), group (blocks), columns (columns: arrays of blocks), separator, spacer (height), code (content), html (content). mode is replace (default), append or prepend.
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": {
"ID": "<ID>",
"blocks": "<blocks>"
},
"name": "wp_write_blocks"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ID | Yes | Target post/page ID (create it first with wp_create_post). | |
| mode | No | replace (default) overwrites post_content; append/prepend add the blocks to the existing content. | |
| blocks | Yes | Ordered array of block specs. Each item is an object with a "type" and the fields for that type (see the tool description). |