block-editor
Edit WordPress content as blocks by listing, reading, inserting, updating, deleting, reordering, and validating block markup written as clean HTML.
Instructions
[CONTRIBUTOR] [Block Editor] Edit content using WordPress blocks. Write clean HTML - most AI-generated HTML passes validation easily. Content is stored as simple block comments: Your content. TROUBLESHOOTING: If sync fails with "Cannot create property on string", use individual parameters (level: 2) instead of attributes objects. If validation fails, read the block first to inspect its current state.
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": {
"action": "<action>",
"documentHandle": "<documentHandle>"
},
"name": "block-editor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Block type (for insert) | |
| align | No | Block alignment | |
| level | No | Heading level (1-6) for heading blocks | |
| action | Yes | Block editing action to perform | |
| blocks | No | Specific blocks to validate | |
| filter | No | Filters for list action | |
| blockId | No | Block ID | |
| content | No | Block content as clean HTML. Example: For headings use <h2>My Title</h2>, for paragraphs use <p>My text</p>, for lists use <ul><li>Item</li></ul>. Most AI-written HTML works perfectly. | |
| ordered | No | True for numbered lists, false for bullet lists | |
| position | No | Position for insert/reorder | |
| attributes | No | Block attributes (advanced use only - prefer individual parameters like level, ordered, align) | |
| newPosition | No | New position for reorder | |
| documentHandle | Yes | Document handle from pull-for-editing | |
| validateImmediately | No |