Astra
New in v3.4.0. Astra stores its customizer settings in a single astra-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 without you hand-editing the Customizer. Registers only when Astra is the active theme.
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, useful for an agent discovering what it can do before calling anything.
emcp-tools/astra-read
Section titled “emcp-tools/astra-read”Operation: get-settings. Reads curated Astra settings with their value plus type/label/group metadata.
Arguments: group (optional: colors, typography, layout, or header-footer) or keys (optional array of specific setting keys). Omit both to return everything on the allowlist.
emcp-tools/astra-write
Section titled “emcp-tools/astra-write”Operation: update-settings. Writes settings by key.
Arguments: values, an object of { key: value } pairs.
The response has three parts: updated (the keys written), skipped (keys not on the allowlist) and 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”Astra prints these settings into its dynamic CSS, and this write does not go through the Customizer, so each value is checked the way Astra’s Customizer checks it (since v3.20.0):
- Colors:
""(reset), hex,rgb(),rgba(), or a palette variable such asvar(--ast-global-color-0). - Font families: a font list such as
"'Inter', sans-serif"orinherit, using only letters, digits, spaces, commas, hyphens, underscores, dots and quotes. - Font size (
font-size-body):{ desktop, tablet, mobile, desktop-unit, tablet-unit, mobile-unit }, sizes as numbers or"", unitspx,em,remor%(defaultpx). - Width (
site-content-width): a whole number of pixels from 200 to 5000. - Layouts (
selectkeys): a layout id of lowercase letters, digits, hyphens and underscores, e.g.header-main-layout-1.
The allowlist
Section titled “The allowlist”| Key | Group | Type |
|---|---|---|
theme-color | colors | color |
text-color | colors | color |
link-color | colors | color |
link-h-color | colors | color |
body-font-family | typography | string |
font-size-body | typography | responsive size object |
font-family-h1…font-family-h6 | typography | string |
site-content-width | layout | number (px) |
site-layout | layout | select |
header-layouts | header-footer | select |
footer-adv | header-footer | select |
footer-sml-layout | header-footer | select |
Call get-settings first, read the returned type/label for a key, then send the same shape back to update-settings.
Permissions
Section titled “Permissions”Both tools are gated on edit_theme_options. Writing takes effect immediately: Astra’s dynamic CSS cache is cleared automatically so the change shows up without a manual “regenerate CSS.”
Independent block integration
Section titled “Independent block integration”In 3.17.0, Spectra 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.
In the admin
Section titled “In the admin”Both tools sit under EMCP Tools → Tools → Themes, in the Astra section. Astra Read is on by default and Astra Write ships off. While Astra is not the active theme, both cards carry a Needs Astra badge and cannot be switched on. After changing a switch, choose Save changes in the save bar and reconnect your AI client.
