Browse documentation +
Getting startedInstallationConnect a clientSafety profilesWordPress ChatPro licensingAntigravity CLIAntigravity IDETroubleshootingOAuth 2.1 setupApplication PasswordsPage builder workflowsLedger and rollbackApprovals and memoryAbility reference
Pro module34 abilities

Astra

These abilities register when Astra is detected on the site and a Pro licence is active. If either is missing the module stays absent rather than failing at call time.

At a glance

Astra registers 34 abilities: 16 that only read, 2 that write, and 16 marked destructive. That split is the practical answer to how much of this module can run unattended. Reads cost nothing and are safe to repeat, so discovery is the part to be generous with; the writes are where review belongs, and the destructive calls stop for an explicit confirmation every single time regardless of which profile is active.

What this module is for

Use WPPilot Pro for Astra settings, modules, palettes, typography, headers, footers, hooks, page headers, post settings, and WooCommerce theme controls.

Before you rely on it: Theme hooks and global design settings can change many routes; verify on a representative staging crawl.

Typical workflows

  • Audit active modules and current defaults
  • Update a header row and verify responsive layout
  • Create a scoped hook after reviewing its display rules

The Astra integration page covers the same module from the workflow side, with the capability map and the questions worth asking before a first write.

Availability on your site

The Astra module needs three things at once: WPPilot Free as the MCP foundation, an active Pro licence, and the companion plugin detected on the site. Miss any one and the module does not register, which is deliberate: an ability that appears in the tool list but fails at call time is worse than an ability that was never offered. What the connected agent can actually call is then narrowed twice more: by the safety profile active on the site, and by the WordPress capabilities of the user behind the credential. A read that succeeds for an administrator can be absent entirely for an editor.

Every write these abilities perform is recorded in the change ledger, and destructive calls can be routed through the approval queue so a person signs off before anything is applied. A successful tool result means the operation returned, not that the front end, the cache, and every dependent template are correct: that still needs a look.

Reads

Available in every safety profile, including Read Only. Inspection costs nothing and is not rate limited.

AbilityWhat it does
wppilot/astra-check-setupCheck Astra SetupDiagnostic snapshot of the Astra install: theme active flag + version + min supported, Astra Pro Addon presence + version + 20-module status map, active color palette, storage keys, CPT entity flags (Advanced Hooks, Advanced Headers), third-party plugin integrations (WooCommerce, EDD, LearnDash, LifterLMS), and current user capability. Call once at the start of any Astra session. Branch on theme.active, addon.active, and modules.<slug> to gate subsequent ability calls.
wppilot/astra-get-color-paletteGet Astra Color PaletteReads the astra-color-palettes option and returns the active palette id, all registered palettes with their names and 9 color slots, and any preset names set by the user. Pass palette_id to read only a specific palette. Falls back to Astra's built-in defaults when the option is not stored.
wppilot/astra-get-css-outputGet Astra Dynamic CSSReturns the CSS string Astra generates at runtime from astra-settings via Astra_Dynamic_CSS::return_output(). Useful for debugging why a style change is not landing on the front-end (e.g. a color or font rule that should have changed). source is astra_dynamic_css when the class is available, or unavailable on installs where the class is not loaded. bytes is the raw length before any truncation — the full CSS is returned without byte-capping since it is already a single atomic string.
wppilot/astra-get-defaultsGet Astra DefaultsReturns the complete Astra_Theme_Options::defaults() map — every key Astra recognises and its factory default value. Use as a schema reference before calling astra-get-settings or astra-edit-settings: the default value's PHP type signals the type each key expects (string, integer, boolean, array). Large values are truncated at 2 048 bytes with a suffix. Call with no input.
wppilot/astra-get-footer-layoutGet Astra Footer LayoutReturns the live Astra Header/Footer Builder desktop and mobile footer grids (footer-desktop-items, footer-mobile-items), a filtered subset of footer config keys (hba-footer-*, hbb-footer-*, hb-footer-*), and the full element and cell allowlists for use before calling astra-set-footer-layout. Rows are: above, primary, below. Footer columns use numeric suffixes (_1 … _5 desktop, _1 … _2 mobile). Elements differ from the header builder — see available_elements.
wppilot/astra-get-header-layoutGet Astra Header LayoutReturns the live Astra Header/Footer Builder desktop and mobile header grids (header-desktop-items, header-mobile-items), a filtered subset of header config keys (hb-header-*, hba-header-*, hbb-header-*), and the full element and cell allowlists you need before calling astra-set-header-layout or astra-reorder-header-row. Rows are: above, primary, below, popup. Call astra-check-setup first to confirm the theme is active.
wppilot/astra-get-hookGet Astra Advanced HookReads a single astra-advanced-hook post by id and returns the full payload: id, title, content (Gutenberg markup, capped at 32 KB with a truncation marker if exceeded), status, layout, action, priority, enabled, template_type, header, footer, padding, location, exclusion, users. The php-execution surface (ast-advanced-hook-with-php, ast-advanced-hook-php-code) is intentionally omitted — exposing raw PHP execution to AI agents is a code-injection vector. Requires the Astra Pro Addon with the advanced-hooks module active.
wppilot/astra-get-layoutGet Astra LayoutResolves the effective container, sidebar, header, and post-title display settings for a specific post (post_id) or the global archive context (post_id=0). Each field shows whether the value comes from per-post meta (source=meta) or the global astra-settings bag (source=global). Use before writing per-post overrides via astra-set-post-settings to see what is already active. Read-only — does not mutate state.
wppilot/astra-get-page-headerGet Astra Page HeaderReads a single astra_adv_header post by id and returns the full payload: id, title, content (capped at 32 KB with a truncation marker if exceeded), status, layout, enabled, design, location, exclusion, users. layout is the sub-key value inside the ast-advanced-headers-layout meta array — one of: advanced-headers-layout-1, advanced-headers-layout-2, disable. enabled is derived from post_status (publish → true, draft → false); there is no ast-advanced-headers-enabled meta key. Requires the Astra Pro Addon with the advanced-headers module active.
wppilot/astra-get-post-settingsGet Astra Post SettingsReturns the per-post Astra display overrides for a given post. raw contains the values stored directly in post meta (empty string when not set); resolved contains the effective values including global Customizer fallback via astra_get_option_meta(); has_override is true for each key that has an explicit post-level value. Use astra-set-post-settings to write overrides, astra-clear-post-settings to revert to global.
wppilot/astra-get-settingsGet Astra SettingsReads keys from the astra-settings option bag via the canonical astra_get_option() accessor (defaults + filters applied). Pass keys to pull only what you need and keep responses lean. Omit keys for a compact subset of ~30 common keys (layout, color, typography basics) or set mode=full for the complete bag. Unknown or non-allowlisted keys are returned in unknown_keys — write still reads the allowlist subset. Call astra-get-defaults to discover valid key names and their expected types.
wppilot/astra-get-woocommerce-settingsGet Astra WooCommerce SettingsReads WooCommerce-specific styling settings from the astra-settings option bag. Requires the Astra Pro Addon with the woocommerce module active and WooCommerce installed. Use the partition parameter to focus on a specific domain (shop_grid, product_styling, cart_style, checkout_layout, filter, quick_view) or omit it for all ~90 keys. Pass keys to request a specific subset — keys absent from the WooCommerce module allowlist surface in unknown_keys.
wppilot/astra-list-customizer-settingsList Astra Customizer SettingsBootstraps the WordPress Customizer and returns the Astra-owned sections + controls registered in it. Each section: {id, title, panel, priority}. Each control: {id, setting, settings, label, type, choices, section, priority}. The setting id maps to the key in astra-settings (or a theme_mod). Use scope=astra_only (default) to keep the response to Astra-prefixed sections (astra-*, ast-*, astra_*). Pass section to drill into a single section.
wppilot/astra-list-hooksList Astra Advanced HooksEnumerates astra-advanced-hook posts as compact summaries — id, title, status, layout, action, enabled, priority, template_type, location_summary. Content body and full targeting arrays are omitted; call astra-get-hook for a specific id. Supports pagination (limit/offset) and filtering by status and layout. Requires the Astra Pro Addon with the advanced-hooks module active.
wppilot/astra-list-modulesList Astra Pro Addon ModulesReturns every Astra Pro Addon module known to the integration (20 total): Advanced Hooks, Advanced Headers, Advanced Footer, Blog Pro, Colors & Background, Mobile Header, Header Sections, Site Layouts, Spacing, Sticky Header, Transparent Header, Typography, WooCommerce, EDD, LearnDash, LifterLMS, Nav Menu, Advanced Search, White Label, Scroll To Top. Each row: {slug, label, active, is_default}. Use to check why a module-gated ability is unavailable, or to enumerate what can be toggled via astra-enable-module / astra-disable-module.
wppilot/astra-list-page-headersList Astra Page HeadersEnumerates astra_adv_header posts as compact summaries — id, title, status, layout, enabled, location_summary. Content body and design array are omitted; call astra-get-page-header for a specific id. Supports pagination (limit/offset) and filtering by status. Requires the Astra Pro Addon with the advanced-headers module active.

Writes

Gated by the active profile and your WordPress capabilities. Rate limited to 120 per minute per credential.

AbilityWhat it does
wppilot/astra-create-hookCreate Astra Advanced HookCreates a new astra-advanced-hook post. Required: title (accepts WP-native alias post_title) and layout. When layout=hooks, action (a WordPress action hook name, e.g. wp_head) is also required. Content (accepts WP-native alias post_content) is treated as raw Gutenberg block markup and capped at 32 KB. Status accepts WP-native alias post_status. Passing both a short name and its WP-native alias with different values returns astra_alias_conflict. The php-execution surface is permanently blocked — use code-snippets-integration for PHP snippet injection instead. Defaults: status=draft, priority=10, enabled=true. Returns the compact hook shape (id, title, status, layout, action, priority, enabled).
wppilot/astra-edit-hookEdit Astra Advanced HookMerge-patches an existing astra-advanced-hook post. Only keys you pass are updated; omitted keys keep their current value. Accepts WP-native aliases (post_title for title, post_content for content, post_status for status) — passing both a short name and its WP-native alias with different values returns astra_alias_conflict. Constraint: when the resulting layout is hooks (either already stored or newly set), action must not be empty. Content is capped at 32 KB. The php-execution surface is permanently blocked. Returns the full hook payload after the patch.

Destructive

Marked destructive in the source, so each call needs an explicit confirmation flag, every time.

AbilityWhat it does
wppilot/astra-clear-post-settingsClear Astra Post SettingsRemoves per-post Astra display overrides, reverting the specified keys (or all 20 keys when keys is omitted) to their global Customizer values. Only the post-meta bindings are deleted — the post content and global Astra settings are untouched. Idempotent: a second call after a successful clear puts every key in no_op.
wppilot/astra-create-page-headerCreate Astra Page HeaderCreates a new astra_adv_header post. Required: title (accepts WP-native alias post_title) and layout. layout must be one of: advanced-headers-layout-1, advanced-headers-layout-2, disable. Content (accepts WP-native alias post_content) is capped at 32 KB. Default status is draft (accepts WP-native alias post_status); set status=publish to activate immediately. Passing both a short name and its WP-native alias with different values returns astra_alias_conflict. Returns the compact shape (id, title, status, layout, enabled). Note: there is no ast-advanced-headers-enabled meta key in the Astra Pro Addon — enabled is derived from status (publish → true, draft → false). Requires the Astra Pro Addon with the advanced-headers module active.
wppilot/astra-delete-hookDelete Astra Advanced HookRemoves an astra-advanced-hook post. Default behaviour: send to trash (recoverable from /wp-admin/edit.php?post_type=astra-advanced-hook&post_status=trash). Pass force=true to permanently delete via wp_delete_post. A second call on an already-trashed id returns astra_not_found — use that to detect idempotent completion. Requires the Astra Pro Addon with the advanced-hooks module active.
wppilot/astra-delete-page-headerDelete Astra Page HeaderRemoves an astra_adv_header post. Default behaviour: send to trash (recoverable from /wp-admin/edit.php?post_type=astra_adv_header&post_status=trash). Pass force=true to permanently delete via wp_delete_post. A second call on an already-trashed id returns astra_not_found — use that to detect idempotent completion. Requires the Astra Pro Addon with the advanced-headers module active.
wppilot/astra-disable-moduleDisable Astra ModuleDeactivates an Astra Pro Addon module by removing its slug from _astra_ext_enabled_extensions. For CPT-bearing modules (advanced-hooks, advanced-headers) with existing posts, the ability returns a 412 confirmation_required error and reports the post count in orphaned_posts — pass confirm=true to proceed anyway (posts are NOT deleted, only the module is disabled). Idempotent: disabling an already-disabled module is a no-op.
wppilot/astra-edit-page-headerEdit Astra Page HeaderMerge-patches an existing astra_adv_header post. Only keys you pass are updated; omitted keys keep their current value. Accepts WP-native aliases (post_title for title, post_content for content, post_status for status) — passing both a short name and its WP-native alias with different values returns astra_alias_conflict. If layout is provided it must be one of: advanced-headers-layout-1, advanced-headers-layout-2, disable. Content is capped at 32 KB. design is a full replace of the design settings array. Returns the full page header payload after the patch.
wppilot/astra-edit-settingsEdit Astra SettingsMerge-patches the astra-settings option bag. Only the keys you pass are changed; every other setting keeps its current value. Writes run under a MySQL advisory lock to prevent data loss from concurrent requests. Unknown keys (not in the ~200-key integration allowlist) and type-mismatched keys are NOT written — both surface in the response. Set strict=true to return a 400 error instead of warnings when any key is refused.
wppilot/astra-edit-woocommerce-settingsEdit Astra WooCommerce SettingsMerge-patches WooCommerce-specific styling keys inside the astra-settings option bag. Only keys in the WooCommerce module allowlist (~90 keys) are accepted — global Astra keys and unknown keys are refused and reported in unknown_keys. Type mismatches land in type_mismatch. Writes run under a MySQL advisory lock and invalidate the CSS cache automatically. Set strict=true to return a 400 error when any key is refused.
wppilot/astra-enable-moduleEnable Astra ModuleActivates an Astra Pro Addon module via Astra_Ext_Extension::activate_extension(). Requires the Astra Pro Addon to be installed. The slug must be one of the 20 known module slugs (call astra-list-modules to enumerate them). CPT-bearing modules (advanced-hooks, advanced-headers) set restart_required=true — flush rewrite rules on the next request to register their custom post types properly. Idempotent: activating an already-active module is a no-op.
wppilot/astra-reorder-header-rowReorder Astra Header RowMoves a single element slug from one cell to another within the same header row (above, primary, or below). Cheaper than a full astra-set-header-layout call when only one element needs to move. The move is atomic under a MySQL advisory lock. If the element is not found in from_cell (already moved or never there), moved=false is returned and no write occurs — making the operation idempotent. Use to_index to control insertion position (0 = first, -1 or omit = append).
wppilot/astra-set-color-paletteSet Astra Color PaletteReplaces the 9 color slots of a registered Astra palette in the astra-color-palettes option. Omit palette_id to target the currently active palette. Accepts hex colors (#rgb or #rrggbb) and rgb()/rgba() strings. Optionally renames the palette via name. The dynamic CSS cache is invalidated after every write. Operation is idempotent — sending the same 9 colors again produces the same state.
wppilot/astra-set-footer-layoutSet Astra Footer LayoutReplaces the Astra footer builder desktop grid (footer-desktop-items) and/or mobile grid (footer-mobile-items) under a MySQL advisory lock. At least one of desktop or mobile must be provided. Unknown cell keys and element slugs are dropped and reported — use strict=true to fail-fast instead. Footer columns use numeric keys (_1 … _5 desktop, _1 … _2 mobile); elements are copyright, menu, widget-1…4, social-icons-1/2, html-1…3, button-1/2, divider-1…3. Call astra-get-footer-layout first.
wppilot/astra-set-header-layoutSet Astra Header LayoutReplaces the Astra header builder desktop grid (header-desktop-items) and/or mobile grid (header-mobile-items) under a MySQL advisory lock. At least one of desktop or mobile must be provided. Unknown cell keys and element slugs are dropped and reported — use strict=true to fail-fast instead. Call astra-get-header-layout first to read the current layout and obtain the valid cell keys and element slugs.
wppilot/astra-set-post-backgroundSet Astra Post BackgroundWrites the responsive background meta (ast-page-background-meta or ast-content-background-meta) for a given post. Each viewport (desktop, tablet, mobile) accepts a partial object with background field overrides. When merge=true (default) the payload is deep-merged over existing meta under a per-post advisory lock; when merge=false the entire meta is replaced. Supplying merge=false with no viewport data, or with viewports whose fields are all invalid, returns an error rather than silently destroying existing state. Unknown fields within a viewport are reported in invalid_fields and skipped. The background-media field must reference an existing attachment id. Valid fields: background-color, background-image, background-repeat, background-position, background-size, background-attachment, background-type, background-media, overlay-type, overlay-color, overlay-opacity, overlay-gradient.
wppilot/astra-set-post-settingsSet Astra Post SettingsMerge-patches the per-post Astra display overrides for a given post. Only the keys you pass are changed; every other override keeps its current value. Accepts the 20 Astra meta keys (layout, header/footer display toggles, page element toggles, background). Unknown keys and enum violations are reported — set strict=true to fail-fast instead. Background keys (ast-page-background-meta, ast-content-background-meta) accept a responsive array; use astra-set-post-background for deep field validation.
wppilot/astra-set-typographySet Astra TypographyMerge-patches typography keys inside astra-settings — body font, headings (global + H1–H6), and size arrays. Partitions input against the typography-specific allowlist (~35 keys); unknown and type-mismatched keys are NOT written and surface in the response. Set strict=true to return 400 on any refused key. Writes run under a settings lock. Responsive size keys (font-size-body, font-size-h1, …) must be sent as arrays with desktop/tablet/mobile/desktop-unit/tablet-unit/mobile-unit.