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 in the Gutenberg Blocks section of the Gutenberg tab on EMCP Tools → Tools. The same tab holds the Pro Block Builder section (the custom block tools, off by default).
All ten are enabled by default (only remove-block is badged destructive). EMCP Tools → Page Builders shows “Gutenberg is always on”: these tools work next to whichever standalone builder you pick there. (With the Classic Editor plugin active the notice reads “Gutenberg is unavailable”, because the block editor itself is switched off.)
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.
An unresolvable path (stale or miscounted, doesn’t point at a real block) no longer silently drops the edit: the core Gutenberg tools return a { error } message, and the Spectra/Kadence Blocks/GenerateBlocks/Blocksy Blocks catalogs below return an invalid_position error. Either way, re-read get-post-blocks and use a real path.
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), path when the position is relative to an existing block, and bindings (optional; bind an attribute to a live data source: { <attribute_name>: { source, args? } }, source is an EMCP Themer source key). A binding that doesn’t fit the target attribute’s type is refused at call time (dynamic_type_mismatch) rather than rendering blank later.
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, bindings (optional, same shape as add-block).
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).
Block builder catalogs
Section titled “Block builder catalogs”Since 3.17.0, block packs have independent switches under EMCP Tools → Page Builders → 2. Gutenberg block plugins, and each enabled pack gets its own tab on EMCP Tools → Tools. Choose Save changes in the save bar after changing them, then reconnect your AI client. They can run together beside Gutenberg and the selected standalone builder. Theme settings remain separate.
- Spectra: native discovery and editing, free EMCP.
- Kadence Blocks: block editing and Design Library patterns, free EMCP.
- GenerateBlocks: V2 content and compiled insertion styles, EMCP Pro.
- Blocksy Blocks: native blocks and embeds, EMCP Pro with Blocksy theme and Companion.
- Otter Blocks: Free/Pro discovery, patterns, styles and settings, EMCP Pro.
Use the individual references for current hashes, serialized markup and permissions. Existing read/write dispatchers remain for compatibility where provided. Static block markup must match the native editor’s save contract; a frontend render alone is not proof of editor validity.
