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.
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”Beyond the generic tools above, four page-builder plugins get their own discover → inspect → act catalog: a live index of the plugin’s own blocks (sourced from the plugin itself, not hand-maintained), a schema lookup for real attributes/defaults, and an insertion tool that scaffolds the correct block structure. All four use the same two-tool dispatcher shape as the Astra, Kadence, and GeneratePress theme-settings packs: call the -read/-write tool with { operation, arguments } (omit operation to list what’s available for that tool).
Spectra (Ultimate Addons for Gutenberg)
Section titled “Spectra (Ultimate Addons for Gutenberg)”emcp-tools/spectra-read / emcp-tools/spectra-write. Registers when the Spectra plugin is active, independent of the active theme.
| Operation | Mode | What it does |
|---|---|---|
list-blocks | read | Compact catalog of Spectra blocks on this site (name, title, description, category, doc link). Optional category/search. |
get-block-schema | read | A block’s real attributes + defaults straight from Spectra’s own registry, plus a ready-to-use example. name or names[]; full: true for everything. |
add-block | write | Insert a Spectra block (post_id, block, attributes?, position?). Spectra’s own defaults apply; a block_id is generated. |
Container/list blocks (buttons, icon-list, tabs, slider, social-share, restaurant-menu, faq, content-timeline) get their required inner-block children scaffolded automatically. Server-rendered blocks (post-grid, post-carousel, post-masonry, post-timeline, google-map, table-of-contents, taxonomy-list, forms) insert as self-closing dynamic markup.
Kadence Blocks
Section titled “Kadence Blocks”New in v3.9.0. emcp-tools/kadence-blocks-read / emcp-tools/kadence-blocks-write. Registers when the Kadence Blocks plugin is active, independent of the active theme (unlike the Kadence theme-settings pack — see Kadence).
| Operation | Mode | What it does |
|---|---|---|
list-blocks | read | Compact catalog of the 32 Kadence blocks (name, title, description, category). Optional category (layout, content, media, embed, form, dynamic, or header) / search. |
get-block-schema | read | A block’s real attributes + defaults from the live block registry, plus a ready-to-use example. name or names[]; full: true for everything. |
add-block | write | Insert a Kadence block (post_id, block, attributes?, position?). A uniqueID is generated and required inner blocks (columns, buttons, list items) are scaffolded. |
list-patterns | read | List Kadence Design Library patterns: professionally-designed, editor-valid sections. Optional category (e.g. Hero, Testimonials, “Counter or Stats,” Call to Action, Media and Text), search, include_pro. Pass categories: true to list category names instead. Prefer a pattern over hand-building a whole section. |
insert-pattern | write | Insert a Design Library pattern by id (post_id, pattern, position?, localize_images?). Inserts Kadence’s own canonical, palette-harmonized markup. localize_images: true downloads the pattern’s images into the Media Library. |
Kadence blocks use a static JS save(), so a headlessly-inserted block always renders correctly on the front end, but the block editor itself can’t byte-match that markup. As of v3.12.2 this is handled automatically: opening a post with AI-inserted Kadence blocks silently repairs them (the same regeneration “Attempt recovery” would do) and shows one notice, just click Update to store the clean markup. Other static-save block packs can opt into the same auto-repair via the emcp_tools_block_repair_namespaces filter. Patterns ship with placeholder copy; edit the headings/text afterward.
GenerateBlocks
Section titled “GenerateBlocks”New in v3.9.1. Pro. emcp-tools/generateblocks-read / emcp-tools/generateblocks-write. Registers when the GenerateBlocks plugin (V2) is active, independent of the active theme (unlike the GeneratePress theme-settings pack).
| Operation | Mode | What it does |
|---|---|---|
list-blocks | read | Compact catalog of the 6 GenerateBlocks V2 blocks (Element, Text, Media, Shape, Looper, Query). Optional category (layout, content, media, or dynamic) / search. |
get-block-schema | read | A block’s registered attributes plus its styles model: all visual styling lives in a styles object (camelCase CSS keys), listed as flat_style_keys. name or names[]; full: true for everything. |
add-block | write | Insert a block (post_id, block, tag_name?, content?, styles?, raw_styles?, media_id?, position?). A uniqueId is generated, styles is built from a friendly flat map (plus raw_styles for camelCase passthrough), and the matching css is compiled for you, GenerateBlocks doesn’t compile server-side, so this tool does it. |
GenerateBlocks V2 blocks store styling in a styles object rather than a className, and render a pre-compiled css attribute. add-block handles the compilation; you never write CSS by hand. Text blocks (Text) take tag_name (h1–h6, p, span, a) and content as RichText; opening one in the editor may prompt “Attempt recovery” once, which preserves the content and styles.
Blocksy Blocks
Section titled “Blocksy Blocks”New in v3.9.1. Pro. emcp-tools/blocksy-blocks-read / emcp-tools/blocksy-blocks-write. Registers when Blocksy Companion is active, independent of the active theme. For managing Companion’s feature modules, see Blocksy.
| Operation | Mode | What it does |
|---|---|---|
list-blocks | read | Compact catalog of the 11 Blocksy blocks. Optional category (dynamic or content) / search. |
get-block-schema | read | A block’s registered attributes. name or names[]; full: true for everything. Most content blocks take no attributes at all. |
add-block | write | Insert a Blocksy block (post_id, block, attributes?, position?). Query Loop and Taxonomy Query get a uniqueId and a scaffolded template child automatically so the loop renders. |
Blocksy blocks are dynamic: most render server-side from theme settings or the current page context rather than storing content you’d edit directly. The 11: Query Loop, Taxonomy Query, and Dynamic Data (dynamic); About Me, Socials, Contact Info, Share Box, Breadcrumbs, Search, Quote, and Widgets Area (content).
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.