Block suites integration
GenerateBlocks AI agent tool reference
GenerateBlocks keeps a cached per-post stylesheet and, in version 2, prints each block's css attribute exactly as stored. WP MCP Pro's block suite pair handles both. insert-block and update-block check every generateblocks/* attribute against the block's registered schema before any snapshot, give each block a unique id in the shape its editor generates, and compile a GenerateBlocks 2 block's styles object into the css attribute its front end prints, refusing any value that could break out of its rule. After a write, and after a rollback, the post is dropped from GenerateBlocks' cached CSS list so the stylesheet is rebuilt on the next view. list-patterns and import-pattern insert a registered or WordPress.org pattern in one undoable write.
GenerateBlocks in plain language: GenerateBlocks MCP.
In practice
How GenerateBlocks work goes with an agent.
GenerateBlocks runs two generations of blocks side by side, and they store styling differently. The older 1.x blocks, such as container and headline, depend on a per-post stylesheet that GenerateBlocks writes to the uploads folder and tracks in an option. The 2.x blocks, such as text, element and media, print a css attribute exactly as saved. The editor builds that attribute from a styles object. An agent writing outside the editor has to reproduce both behaviours, and WP MCP Pro does.
Which GenerateBlocks blocks are available, and which are the 1.x ones?
Runs block-suites-read with get-block-schemas for the generateblocks suite. 1.x blocks are flagged legacy with the note that unknown attributes are allowed. 2.x blocks are checked strictly against their schema.
Add a text block under the hero with a large heading style on desktop and centered on mobile.
Runs block-suites-write insert-block with a generateblocks/text block and a styles object including an @media rule. The styles are compiled into the css attribute, the block gets a unique id, and the post is snapshotted.
Change the hover color of the button at path [3,1] to the accent color.
Runs update-block with a styles patch. Attributes are merged, the id cannot change, and css is recompiled because styles changed. Values containing braces, semicolons or angle brackets are refused.
Import a two-column feature pattern under the intro.
Runs list-patterns, then import-pattern in one snapshot. Remote images are sideloaded first, ids are made unique within the post, and the post is dropped from the list of posts whose generated stylesheet is current.
What your AI can do
Real GenerateBlocks operations, every write reversible.
- Read each GenerateBlocks block's attribute schema
- Insert and update GenerateBlocks with every attribute validated first
- Compile GenerateBlocks 2 styles into the css the front end prints
- Rebuild the per-post stylesheet after writes and rollbacks
- Browse and import patterns in a single undoable write
- Roll back any block write exactly, per change or per session
Example prompts
Example GenerateBlocks prompts.
Add a GenerateBlocks container with a heading and a button to /contact.
Make the hero text on the About page larger on desktop and centered on mobile.
Import a two-column feature pattern that uses GenerateBlocks under the intro.
Under the hood
The GenerateBlocks calls, under the hood.
block-suites-read({ operation: "get-block-schemas", args: { suite: "generateblocks" } })
block-suites-write({ operation: "update-block", args: { suite: "generateblocks", id: 8, expected_hash, path: [0], attrs: { styles: {…} } } }), styles compiled to css, snapshotted
Safety and access
What can be undone on GenerateBlocks, and what costs what.
Recoverable on GenerateBlocks
- Each insert-block, update-block and import-pattern call is one snapshot of the whole post.
- rollback-operation restores the exact content, and the post is removed from GenerateBlocks' list of current stylesheets so the file is rebuilt on the next view.
- Per-session rollback reverts all block writes together.
GenerateBlocks limits and opt-ins
- For a 1.x block, the server only knows GenerateBlocks' PHP defaults, so unknown attributes are allowed and update-block checks only the attributes it changes.
- Only the 2.x blocks with a styles attribute get css compiled. Passing css yourself in the same patch skips the compile for that block.
- Images sideloaded for an imported pattern stay in the Media Library after a rollback.
- GenerateBlocks' own remote pattern libraries are not used, because they depend on a key hardcoded in the plugin. Only registered patterns and the WordPress.org Pattern Directory are offered.
Free or Pro: The dedicated GenerateBlocks support is part of WP MCP Pro, in the block-suites-read and block-suites-write pair, which appears while GenerateBlocks or another supported suite is active. The free plugin can still edit GenerateBlocks blocks as raw markup, but it does not compile styles into css or reset the generated stylesheet, so a 2.x block may render unstyled.
Part of WP MCP Pro
The GenerateBlocks integration is part of WP MCP Pro.
One Pro licence unlocks the GenerateBlocks tools and every other Pro integration on this site: Elementor deep editing, the other page builders, the forms adapter pack and more, 133 Pro tools in all. The free plugin still covers the rest of WordPress and the full snapshot and undo engine, so you can try the safety model before you buy.
Frequently asked
GenerateBlocks MCP: questions, answered.
Why do GenerateBlocks 2 blocks need special handling?
Their front end prints the css attribute verbatim, and the editor compiles it from styles whenever a block is edited. A block written outside the editor needs the same compile or it renders unstyled, so the block suite pair does it for you.
Is there a GenerateBlocks free path?
Yes. The free Gutenberg block tools edit any registered block by raw markup. The dedicated GenerateBlocks support, with validation, style compiling and pattern import, is part of WP MCP Pro.
What does a styles object look like?
It uses camelCase CSS properties at the top level, such as fontSize, with nested selectors like "&:hover" and at-rules like "@media (max-width:767px)" as objects. Properties are sorted inside each rule, the way the editor does it. The block's selector is built from its type and unique id.
Which blocks get their css compiled?
The 2.x blocks that use styles: text, element, media, shape, query, looper, loop-item and query-page-numbers. The 1.x blocks, such as container, headline, button, grid and image, keep their own attribute format and rely on the generated per-post stylesheet, which is reset after a write.
Can a style value inject extra CSS?
No. A value that could leave its declaration or rule, meaning one containing braces, semicolons or angle brackets, is refused rather than escaped. The block is not written, and no snapshot is taken for the refused call.
Related integrations
More integrations for the same agent.
MCP for Kadence Blocks
ProBlock suites, 5 tools.
MCP for Spectra
ProBlock suites, 5 tools.
MCP for Otter Blocks
ProBlock suites, 5 tools.
MCP for Synced Patterns
FreeBlock suites, 2 tools.
MCP for Elementor
ProPage builders, 14 tools.
MCP for Gutenberg
FreePage builders, 4 tools.
Browse the full Integrations hub, or read more on GenerateBlocks MCP, Gutenberg MCP and the WordPress MCP plugin.