wp_insert_block
Inserts a new Gutenberg block into a post at a given position. Appends to end if index is omitted.
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_insert_block"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Zero-based position to insert at. Appends to end if omitted. | |
| post_id | Yes | The post ID to insert the block into. | |
| 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. | |
| parent_path | No | Raw path of the parent block. Omit to insert at the top level. | |
| block_markup | Yes | The block markup to insert (HTML with Gutenberg block comments). |