Blocks and site designPro
Spectra One theme MCP: restyle Global Styles with a rollback snapshot
Spectra One is a full-site-editing theme, so Spectra One theme MCP work happens in WordPress Global Styles rather than a Customizer. GoBuildWP reads the palette, type presets, templates and bundled patterns, writes palette slots, typography and style variations into the user's global-styles post, and can export a snapshot first. The snapshot holds the Global Styles overlay and the theme's options row, not template and template-part files, navigation, installed fonts or per-post display overrides, so it restores the styles rather than the whole site design. It still matters, because several of these writes replace a subtree outright and have no finer undo.
Show me what the dark style variation would change, apply it, and keep our current look so I can go back.
wppilot/spectra-one-export-designReadReturns the overlay and the options row as a schema-version-1 snapshot with an export timestamp.
wppilot/spectra-one-list-style-variationsReadConfirms dark is bundled on this install and shows three sample hexes from its palette.
wppilot/spectra-one-apply-style-variationConfirm firstRun with dry_run true first to return the resulting overlay, then again to write: colour and typography subtrees and the whole styles block are replaced.
wppilot/spectra-one-get-color-paletteReadReports the new swatches and whether each slot now comes from the user overlay or the theme.
- Edition
- Pro
- Abilities
- 22
- Requires
- WordPress 6.9+, PHP 8.0+, Spectra One theme 1.2.2+, Spectra plugin (block operations) 2.16.0+
Data model
theme.json defaults under a wp_global_styles overlay
The theme's theme.json holds the defaults: fourteen palette slugs such as primary, heading, surface and outline, fluid font-size presets, line-height and weight presets, layout widths. What you change in the Site Editor is saved as JSON in a single wp_global_styles post, and the page renders theme.json with that overlay on top. GoBuildWP never edits the theme file; every design write changes the overlay and flushes the theme.json cache. A few theme options, such as the back-to-top toggle, live in a swt_theme_options row; body and heading typography is written into the global-styles overlay through the theme's own update-typography ability.
Templates, template parts and patterns ship as files in the theme, and the listing abilities return their paths without the markup. Header and footer designs are switched by activating a different bundled pattern on the template part, and the navigation edit writes a wp_navigation post and points both parts at it. Per-post display overrides are five booleans on posts and pages: hide header, hide footer, hide title, sticky header and transparent header.
Abilities
Spectra One abilities by effect
Inspect13
spectra-one-check-setupCheck Spectra One Setupspectra-one-export-designExport Spectra One Designspectra-one-get-color-paletteGet Spectra One Color Palettespectra-one-get-post-display-settingsGet Spectra One Post Display Settingsspectra-one-get-theme-infoGet Spectra One Theme Infospectra-one-get-theme-settingsGet Spectra One Theme Settingsspectra-one-get-typography-settingsGet Spectra One Typography Settingsspectra-one-list-hooksList Spectra One Hooksspectra-one-list-patternsList Spectra One Patternsspectra-one-list-posts-with-display-overridesList Posts with Spectra One Display Overridesspectra-one-list-spectra-blocksList Spectra (UAGB) Blocksspectra-one-list-style-variationsList Spectra One Style Variationsspectra-one-list-templatesList Spectra One Templates
Create and change1
Destructive8
spectra-one-apply-designApply Spectra One Design Snapshotspectra-one-apply-style-variationApply Spectra One Style Variationspectra-one-edit-navigationEdit Spectra One Navigationspectra-one-edit-template-partEdit Spectra One Template Partspectra-one-set-color-paletteSet Spectra One Color Palettespectra-one-set-post-display-settingsSet Spectra One Post Display Settingsspectra-one-set-theme-settingsSet Spectra One Theme Settingsspectra-one-set-typographySet Spectra One Typography
Reference: /docs/reference/spectra-one
Documented source abilities; live registration can be narrower. Edition and effect labels describe the source catalogue. The installed schema, dependency versions, licence, WordPress capability, safety profile and per-ability policy determine availability; labels alone do not prove confirmation or recovery.
Limits
What can and cannot be undone
- Palette, typography and style-variation writes record a before-image of the global-styles post; theme settings and per-post display overrides restore their option row or post.
- Applying a snapshot, editing navigation, switching a header or footer pattern and installing a font are recorded as irreversible, each for a stated reason, such as the first template-part edit creating a customised copy the ledger could not see beforehand.
- Design writes need a saved global-styles post; on a site where nobody has saved the Site Editor, they return spectra_one_no_global_styles.
- Snapshots above 1 MiB are refused, and unknown top-level keys are filtered out and reported rather than written.
- Write paths need the theme at its supported floor; below it, discovery still works but every write reports the theme as not active.
Worked example
Trying the dark variation with a way back
Expected outcome to verify on the installed stack; this sequence has not been recorded as a runtime test.
The site switches to the dark variation, and the saved snapshot can be passed to spectra-one-apply-design to return to the previous look. Block style rules the variation does not mention are dropped by the apply, which is exactly what the dry run is for.
Initialize the saved Global Styles record before the first write. Export the design before editing; recovery from that snapshot is a manual restoration, not rollback-change. Template and template-part files, navigation records, per-post overrides and font files are outside the global_styles and theme_options snapshot.
spectra-one-export-designReturns the overlay and the options row as a schema-version-1 snapshot with an export timestamp.
spectra-one-list-style-variationsConfirms dark is bundled on this install and shows three sample hexes from its palette.
spectra-one-apply-style-variationRun with dry_run true first to return the resulting overlay, then again to write: colour and typography subtrees and the whole styles block are replaced.
spectra-one-get-color-paletteReports the new swatches and whether each slot now comes from the user overlay or the theme.
Other plugins
Spectra One beside the Spectra plugin
- The Spectra block plugin is optional here; with it active, an extra ability lists its uagb/ blocks. Both products can enqueue the same Google Font family, so the skill picks one place to configure fonts.
- The theme registers its own spectra-one/ abilities on WordPress's Abilities API; GoBuildWP's install-font, navigation and template-part writes delegate to those and add locking around them.
Menus, landing pages and a new brand font
Adding one menu item with spectra-one-edit-navigation without losing the rest
The Spectra One theme MCP navigation write has a default that surprises people: append is false unless the call says otherwise, and without append the items sent become the whole menu. Asking the agent to "add a Careers link" therefore has to go out with append true, which merges the new item into the existing wp_navigation post, de-duplicates by id or URL and merges children by URL. A top-level item with children renders as a dropdown.
The same call points both the header and footer template parts at that navigation post, so one write changes the menu everywhere the theme prints it. It is also one of the writes GoBuildWP records as irreversible, which means the export snapshot will not bring a menu back either: navigation records sit outside it. Before a replace, ask the agent to list the current items in its reply so they can be sent back by hand if needed.
A Spectra One landing page with no header, footer or title
Campaign pages often need the theme's chrome out of the way. Spectra One stores that per post as five switches: hide_header, hide_footer, hide_title, sticky_header and transparent_header. spectra-one-set-post-display-settings writes all five every time and accepts no partial patch, so the agent reads the current values with spectra-one-get-post-display-settings, changes the ones you asked for and sends the full set back. A false removes that meta row and the theme default applies.
Only posts and pages carry these switches, because the theme's metabox is registered for those types alone; a call against a custom post type is refused before anything is written. spectra-one-list-posts-with-display-overrides finds every post with at least one switch set, which is the quick way to find old campaign pages still hiding their footer after the campaign ended. These writes restore from the change ledger, post by post.
Installing a brand font and making it the heading font
Two calls cover a new typeface. spectra-one-add-font-family downloads a Google family into the WordPress Font Library, using the family name exactly as fonts.google.com spells it and the weights you ask for, 400 and 700 when none are given; a second call for the same family reports it as already installed. The font files then come from your own server. spectra-one-set-typography accepts either a bundled family slug or an installed Google Font slug for body or headings, with a named weight or a number from 100 to 900 and a preset or numeric line height.
Body size is set by one preset slug, from x-small to xxxx-large, because the theme sizes body text from a single fluid preset; separate tablet and mobile sizes are refused. The font install is recorded as irreversible, while the typography change can be rolled back. If the Spectra plugin also loads Google Fonts on the same site, pick one of the two to own fonts.
Spectra One writes and the confirmation each one waits for
Most Spectra One writes are destructive in GoBuildWP's classification: palette, typography, variations, snapshots, navigation, template parts, theme settings and per-post display, so on Production Safe each waits for confirm. Adding a font is an ordinary write, and Read Only allows the inspection abilities, export included, and nothing else. The Spectra One reference lists every parameter, and the Spectra plugin page covers the block plugin.
- "Add a Careers link under About in the main menu, keeping everything that is there now."
- "Hide the header and footer on the Black Friday page and leave its title showing."
- "Install DM Serif Display in 400 and use it for headings; keep the body font as it is."
Questions
Spectra One questions
Does Spectra One have Customizer settings an AI can change?
Almost none. It is a block theme, so design lives in Global Styles; a residual theme mod can be read with a PHP snippet, but there is no Customizer module to drive.
Can the agent choose any font for Spectra One?
It can install a Google family into the WordPress Font Library, then set body or heading typography. The family has to be one of the theme's presets or a font already installed that way; the weight can be a named preset or a number from 100 to 900, and the line height a named preset or a number up to 5.
Is a style variation merged with my changes?
Partly. For the settings it declares, the variation replaces that subtree, and it replaces the whole styles block; spacing, layout and custom tokens it does not mention survive.
Where these facts come from
GoBuildWP behaviour is taken from the plugin source and the ability reference; third-party details from the vendor documentation below, checked by the GoBuildWP team.
Spectra One is a separate product; no partnership or endorsement is implied.