GenerateBlocks MCP tools
Available in EMCP 3.17.0. GenerateBlocks V2 pairs a styles object with compiled CSS. EMCP Pro builds both from supported insertion inputs, letting an agent create native containers and text without leaving their styles disconnected from the saved block.
Requirements and setup
Section titled “Requirements and setup”- Check installed versions. Active GenerateBlocks V2, verified on 2.4.0. EMCP Pro is required.
- Enable the integration. Open EMCP Tools > Page Builders and enable this Gutenberg pack independently.
- Connect and inspect. Reconnect your MCP client, read context and schemas, and enable the write tools needed for the task. Start with a draft and inspect the native editor.
Native workflow
Section titled “Native workflow”GenerateBlocks has its own toggle and tools beside Gutenberg. Read schemas to choose friendly style fields or native raw styles, then use complete serialized markup for updates. GeneratePress configuration remains in Themes and is not required for the block workflow.
Discover installed blocks
Section titled “Discover installed blocks”Read the catalog, exact attributes and existing mixed Gutenberg content.
Prepare native content
Section titled “Prepare native content”Insert blocks or replace one complete serialized block using the current page hash.
Validate in Gutenberg
Section titled “Validate in Gutenberg”Check saved markup, frontend styles and responsive output in the native editor.
Tool reference
Section titled “Tool reference”All names use the emcp-tools/ namespace. Read the live input schema for optional fields, enums, limits and confirmation requirements; this table lists required inputs only.
| Tool | Access | Purpose | Required inputs |
|---|---|---|---|
generateblocks-get-context | Read | Inspect independent activation state. | None |
generateblocks-list-blocks | Read | Discover installed block types. | None |
generateblocks-get-block-schema | Read | Inspect attributes and examples. | name or names |
generateblocks-get-post-blocks | Read | Read mixed content, markup and hash. | post_id |
generateblocks-add-block | Write | Insert supported native content. | post_id, expected_hash, block |
generateblocks-update-block | Write | Replace one complete serialized block. | post_id, expected_hash, path, markup |
generateblocks-move-block | Write | Move this plugin’s block in the mixed tree. | post_id, expected_hash, path, position |
generateblocks-remove-block | Write | Remove a block and its children. | post_id, expected_hash, path |
The generateblocks-read and generateblocks-write dispatchers remain for compatibility. Prefer individual tools for new workflows. New writes use the hash from get-post-blocks; legacy dispatchers retain their existing contract.
Example request
Section titled “Example request”Create a GenerateBlocks V2 feature section using native containers and text. Compile matching CSS from supported inputs and preserve the surrounding Gutenberg content.
Read current state before editing and re-read after each save. If a hash is stale, inspect the changed document before rebuilding the request. A successful save is not proof of correct visual output: inspect the native editor and frontend.
Supported scope
Section titled “Supported scope”- Requires EMCP Pro and an active compatible GenerateBlocks installation.
- The verified content model is GenerateBlocks V2, tested on 2.4.0.
- Update markup must preserve native IDs, styles and compiled CSS. GeneratePress settings are separate.
Troubleshooting
Section titled “Troubleshooting”If tools are missing, check versions, dependencies, integration selection, tool switches and user capabilities. Reconnect long-lived MCP clients after plugin updates or selection changes. If output differs after saving, inspect the native document and styles before retrying; do not bypass the adapter with direct metadata writes.
See the GenerateBlocks integration overview, builder setup guide and agent skills.
