Skip to content

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.

Both tools take { operation, arguments }. Omit operation to get back the list of available operations for that tool.

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), declared supports, 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 Customizer theme_mod values.

Disabled by default. Registers behind the edit_files / switch_themes capabilities. Operations:

  • set-mods — write Customizer theme_mod values. Structural keys are refused.
  • create-child-theme — scaffold a style.css + functions.php child of the active parent and activate it, so an agent can then edit theme files via the Filesystem tools. Idempotent, requires confirm: true, and refuses to build a grandchild.

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 } })

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.