Gutenberg blocks
New in v3.1.0. A block-editor counterpart to the Elementor tools, minimal and systematic, with no per-block tools. Built on pure WordPress core (parse_blocks / serialize_blocks), so they work with no Elementor dependency and register always-on next to the WordPress Content tools. They appear under a Gutenberg tab on the Tools screen.
All ten are enabled by default (only remove-block is badged destructive).
How addressing works
Section titled “How addressing works”Blocks are raw markup in, raw markup out. Existing blocks are addressed by an index path (an array like [2, 1] meaning “the second child of the third top-level block”), which you obtain from get-post-blocks. The tools parse the post’s blocks, navigate by path, mutate, and re-serialize while preserving container wrapper markup.
A typical flow: get-post-blocks to read the tree and paths → add-block / update-block / move-block to edit → re-read if you need fresh paths.
Read tools
Section titled “Read tools”emcp-tools/list-blocks
Section titled “emcp-tools/list-blocks”Compact index of registered block types (name, title, category). Filter by category or search.
Returns: array of { name, title, category }. Read-only.
emcp-tools/get-block-schema
Section titled “emcp-tools/get-block-schema”A block’s attributes, supports, and a markup example. Pass a single name or a names[] batch.
Returns: { name, attributes, supports, example }. Read-only.
emcp-tools/get-post-blocks
Section titled “emcp-tools/get-post-blocks”The parsed block tree for a post, with an index path per block, the addressing you pass to the edit tools.
Input: post_id.
Returns: the block tree, each node with its path, blockName, and attributes. Read-only.
emcp-tools/list-patterns
Section titled “emcp-tools/list-patterns”Registered block patterns (name, title, categories, description).
Returns: array of patterns. Read-only.
Edit tools
Section titled “Edit tools”emcp-tools/add-block
Section titled “emcp-tools/add-block”Insert raw block markup at a position.
Input: post_id, markup, position (append / prepend / before / after / inside), and path when the position is relative to an existing block.
emcp-tools/update-block
Section titled “emcp-tools/update-block”Replace the block at an index path with new markup.
Input: post_id, path, markup.
emcp-tools/remove-block
Section titled “emcp-tools/remove-block”Delete the block at an index path. Destructive.
Input: post_id, path.
emcp-tools/move-block
Section titled “emcp-tools/move-block”Move a block to a new position.
Input: post_id, path, target position (+ target path).
emcp-tools/duplicate-block
Section titled “emcp-tools/duplicate-block”Clone the block at a path; the copy is inserted immediately after it.
Input: post_id, path.
emcp-tools/insert-pattern
Section titled “emcp-tools/insert-pattern”Insert a registered pattern’s markup at a position.
Input: post_id, pattern name, position (+ path).
When to use these vs. update-post
Section titled “When to use these vs. update-post”The WordPress Content update-post tool can rewrite a post’s entire block content in one shot. Prefer these incremental block tools when you want to change one section without touching the rest. They’re safer for edits to existing, human-authored posts, and they preserve surrounding markup. In the WordPress block editor, the AI Chat panel steers the agent toward these tools over a full rewrite.