wp_blocks_insert
Insert Gutenberg blocks into WordPress posts or pages at a specific position, using hash references to avoid overwriting changed blocks, and preview with dry-run.
Instructions
Insert Gutenberg block(s). Hash references prevent overwriting a block changed since it was read. Supports dry-run.
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": {
"ref": "<ref>",
"at": "<at>",
"position": "<position>",
"block": "<block>"
},
"name": "wp_blocks_insert"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| at | Yes | ||
| ref | Yes | Post or page ID/slug | |
| block | Yes | ||
| dry_run | No | Preview changes without writing | |
| position | Yes | ||
| post_type | No | page | |
| allow_normalization | No | Allow saving when parse/serialize normalizes the original content | |
| if_unmodified_since | No | Fail if modified_gmt changed since this timestamp |