Skip to main content
Glama

Apply a style variation

apply_style_variation
Destructive

Apply a style variation from the active theme to your site's global styles. Preview the JSON-path diff first, then confirm to replace or merge customizations, with undo via revisions.

Instructions

Apply one of the active theme's style variations to the site's global styles — what choosing it in Site Editor → Styles does. Without confirm_token it is a dry run showing the JSON-path diff between the current user styles and the result. A full variation replaces the user's global-styles customisations; a colour or typography partial is merged into them. The previous state is kept as a global-styles revision (GET /wp/v2/global-styles/{id}/revisions), which is how to undo.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNoDisambiguates a title shared by a full variation and a partial.
modeNoauto: full variations replace the user styles, partials merge into them (Site Editor behaviour). replace: overwrite all user customisations. merge: deep-merge the variation over the current customisations.auto
indexNoVariation index from list_style_variations — an alternative to title.
titleNoVariation title or slug from list_style_variations, e.g. "Evening".
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.
confirm_tokenNoToken from this tool's dry-run preview. Omit to preview.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Whereas the annotations only signal readOnlyHint=false and destructiveHint=true, the description discloses exactly what is destructive — a full variation 'replaces the user's global-styles customisations' — and reveals the safety valve: state is preserved as a global-styles revision and the endpoint to undo is given. The dry-run/diff behavior without confirm_token is also explicitly spelled out, which is substantial context beyond the structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The four sentences are front-loaded with the core action and then cover dry-run behavior, mutation semantics, and undo path — each earns its place and the ordering is logical. It is somewhat dense with parenthetical asides, but nothing is wasted or repetitive relative to the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive mutating tool with no output schema, the description covers the full call lifecycle: preview and diff output, commit via confirm_token, replace-vs-merge behavior, and precisely how to undo via revisions. Given the tool's complexity and its destinations, nothing an agent needs to invoke it correctly or safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and each parameter is already well documented in the schema (enums, defaults, source from list_style_variations, confirm-token semantics). The description does usefully tie kind and mode to real side effects (full replaces vs partial merges), but that relationship mostly duplicates the schema's auto-mode explanation, so it does not add much beyond the documented baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb plus resource ('apply one of the active theme's style variations to the site's global styles') and grounds it in a familiar UI action ('what choosing it in Site Editor → Styles does'), so an agent immediately understands the purpose. It is also easy to distinguish from siblings like get_global_styles, update_global_styles, diff_global_styles, and list_style_variations because it names the precise action and the input source.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear, actionable usage conditions: omit confirm_token for a dry-run preview and include it to commit; it also explains how the tool behaves depending on kind (full replaces, partial merges). It does not explicitly name when-not-to-use alternatives such as update_global_styles or diff_global_styles, but the Site Editor analogy and the dry-run/confirm contract give a strong practical usage frame.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools