GeneratePress
New in v3.9.1, free since v3.20.0 (earlier versions required 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.
GenerateBlocks, the companion block plugin, has its own tools and stays Pro: see GenerateBlocks. The emcp-generatepress agent skill is also part of Pro.
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. 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 response has three parts:
updated: the keys that were written.skipped: keys that are not on the allowlist.rejected: an object of{ key: reason }for values that failed the checks below. Nothing is written for a rejected key; the other keys in the same call are still saved.
Value checks
Section titled “Value checks”GeneratePress prints these settings into the CSS of every page, and this write does not go through the Customizer, so each value is checked the way GeneratePress’s own Customizer checks it:
- Colors:
""(reset), hex (#fffor#ffffff),rgb(),rgba(), or a palette variable such asvar(--accent). - Choices:
content_layout_settingandcontainer_alignmentaccept only GeneratePress’s own values (see the table). - Sizes: whole numbers of pixels within bounds:
container_width200 to 5000,body_font_size6 to 200. - Palette: each
global_colorsentry needs a uniqueslugofa-z,0-9and hyphens and a hex,rgb()orrgba()color (not avar()). An emptynamefalls back to the slug.
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 | Hex, rgb(), rgba() or a palette var, e.g. "var(--base-2)". "" resets it. |
text_color | colors | Hex, rgb(), rgba() or a palette var, e.g. "var(--contrast)". |
link_color | colors | Hex, rgb(), rgba() or a palette var, e.g. "var(--accent)". |
link_color_hover | colors | Hex, rgb(), rgba() or a palette var. |
container_width | layout | Integer px, e.g. 1200. |
content_layout_setting | layout | "separate-containers" | "one-container". |
container_alignment | layout | "boxes" | "text". |
body_font_size | typography | Integer px. See below. |
Call get-settings first, read the returned shape for a key, then send a matching value back to update-settings.
Body font size
Section titled “Body font size”GeneratePress 3.1 and later use dynamic typography by default, where font sizes live in a typography list instead of the old body_font_size setting. On those sites, writing body_font_size sets the size (in px) of the body rule in that list and keeps the rule’s font family; if there is no body rule yet, one is added. Sites without dynamic typography (often sites upgraded from older GeneratePress versions) get the legacy setting.
Reading body_font_size returns null when no size is set and the theme default applies, or when the body rule uses a unit other than px.
Permissions
Section titled “Permissions”Both tools require the edit_theme_options capability and GeneratePress as the active theme. No licence is needed. 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.
Independent block integration
Section titled “Independent block integration”In 3.17.0, GenerateBlocks has its own tools and an independent switch on EMCP Tools → Page Builders. Theme configuration stays in Themes. The block plugin does not require the matching theme. The GenerateBlocks tools remain part of Pro.
In the admin
Section titled “In the admin”Both tools sit under EMCP Tools → Tools → Themes, in the GeneratePress section. GeneratePress Read is on by default on a new install and GeneratePress Write ships off. On sites where the read tool was switched off while it was a Pro tool, it stays off after updating until you switch it on. While GeneratePress is not the active theme, both cards carry a Needs GeneratePress badge and cannot be switched on. After changing a switch, choose Save changes in the save bar and reconnect your AI client.
