Active theme (any theme)
Before the theme-specific packs (Astra, Kadence, GeneratePress, Blocksy), EMCP Tools ships a builder-agnostic Themes layer that works with whatever theme a site is running. It is the base every named pack builds on: when the active theme is one of the supported ones, the matching pack adds a curated, verified settings allowlist on top; otherwise these generic tools still give an agent the theme context and Customizer access it needs.
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/theme-read
Section titled “emcp-tools/theme-read”Read-only, on by default. Operations:
get-theme-context— the active theme and its parent, the detected framework, whether it is a block theme (is_block_theme), declaredsupports, registered menu locations, and whether a child theme is active. Call this first so an agent knows what it is working with.get-mods— read the theme’s Customizertheme_modvalues.
emcp-tools/theme-write
Section titled “emcp-tools/theme-write”Disabled by default. Registers behind the edit_files / switch_themes capabilities. Operations:
set-mods— write Customizertheme_modvalues. Structural keys are refused.create-child-theme— scaffold astyle.css+functions.phpchild of the active parent and activate it, so an agent can then edit theme files via the Filesystem tools. Idempotent, requiresconfirm: true, and refuses to build a grandchild.
Example
Section titled “Example”Read the active theme’s context before doing anything else:
theme-read({ operation: "get-theme-context" })Create a child theme so theme files can be edited safely:
theme-write({ operation: "create-child-theme", arguments: { confirm: true } })Safety
Section titled “Safety”theme-read is read-only and on by default. theme-write ships off and, because create-child-theme writes a functions.php and activates the child (effectively code execution), it stays behind the disabled-by-default write gate and the edit_files / switch_themes capabilities. Enable it on the EMCP Tools → Tools tab when you need it.
See also
Section titled “See also”- Astra & Spectra, Kadence, GeneratePress, Blocksy — curated per-theme settings + block packs on top of this layer.
- EMCP Themer — the builder-agnostic theme builder (headers, footers, templates).