GeneratePress
New in v3.9.1. Pro. GeneratePress stores its Customizer settings in a single generate_settings option. EMCP Tools exposes a curated allowlist of that option over two dispatcher tools, so an agent can read and adjust your site’s theme design directly. Registers only when GeneratePress is the active theme.
For discovering and inserting GenerateBlocks (the companion block plugin), see Block builder catalogs on the Gutenberg blocks page.
How it works
Section titled “How it works”Both tools take { operation, arguments }. Omit operation to get back the list of available operations for that tool.
emcp-tools/generatepress-read
Section titled “emcp-tools/generatepress-read”Operation: get-settings. Reads curated GeneratePress settings with their value plus type/label/group/shape metadata. Colors reference the global palette as a CSS variable, e.g. var(--accent), rather than raw hex, read global_colors first to know what those variables currently mean.
Arguments: group (optional — palette, colors, layout, or typography) or keys (optional array of specific setting keys). Omit both to return everything on the allowlist.
emcp-tools/generatepress-write
Section titled “emcp-tools/generatepress-write”Operation: update-settings. Writes settings by key. Any key not on the allowlist is reported back in skipped, not rejected outright. Read the shape from get-settings first, global_colors in particular is an array of { name, slug, color }, not a flat value.
Arguments: values — an object of { key: value } pairs.
The allowlist
Section titled “The allowlist”| Key | Group | Shape |
|---|---|---|
global_colors | palette | Array of { name, slug, color }, the palette other colors reference as var(--slug), e.g. var(--accent). |
background_color | colors | CSS color or a palette var, e.g. "var(--base-2)". |
text_color | colors | CSS color or palette var, e.g. "var(--contrast)". |
link_color | colors | CSS color or palette var, e.g. "var(--accent)". |
link_color_hover | colors | CSS color or palette var. |
container_width | layout | Integer px, e.g. 1200. |
content_layout_setting | layout | "separate-containers" | "one-container" | "full-width". |
container_alignment | layout | "boxed" | "text". |
body_font_size | typography | Integer px. |
Call get-settings first, read the returned shape for a key, then send a matching value back to update-settings.
Permissions
Section titled “Permissions”Both tools require an active Pro license, edit_theme_options capability, and GeneratePress as the active theme. A write clears GeneratePress’s cached dynamic CSS automatically, so the change is visible on the next page load with no manual “regenerate CSS” step.