Skip to main content
Glama

Update global styles

update_global_styles

Apply site-wide global style updates for a block theme: change palette, typography, spacing, and per-block styling. Read existing settings first to avoid overwriting; optionally deep-merge changes instead of replacing entire branches.

Instructions

Update a block theme's global styles — palette, typography, spacing, per-block styling. Changes apply site-wide immediately. Read them first: by default this merges only at the top level, so a partial settings object replaces that whole branch — pass merge: true to deep-merge instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mergeNoDeep-merge the supplied objects into the current customisations instead of replacing the whole settings/styles branch. Arrays such as a palette are still replaced wholesale.
stylesNotheme.json-shaped styles, e.g. {"color": {"background": "#fff"}, "typography": {...}}.
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.
settingsNotheme.json-shaped settings, e.g. {"color": {"palette": [...]}}.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / merge
      Added value: +{
      +  "default": false,
      +  "description": "Deep-merge the supplied objects into the current customisations instead of replacing the whole settings/styles branch. Arrays such as a palette are still replaced wholesale.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / settings / propertyNames
      Added value: +{
      +  "type": "string"
      +}
    • addedInput schema / properties / styles / propertyNames
      Added value: +{
      +  "type": "string"
      +}
  2. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations, it discloses the critical side effect that changes apply site-wide immediately and warns that a partial settings object replaces the whole branch unless merge is true. This is essential behavioral context that annotations alone do not convey, especially for a mutating operation.

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

Conciseness5/5

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

Two sentences carry all the essential information: what the tool updates, the immediate site-wide effect, the read-first warning, and the merge behavior. There is no filler, and the most important behavioral caveat is placed prominently.

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 tool with four optional parameters and no output schema, the description covers the action, scope, safety caveat, and merge semantics. It is sufficient for an agent to decide whether to call this tool and how to set the critical merge parameter.

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

Parameters4/5

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

The schema already covers all four parameters with 100% description coverage, so the baseline is 3. The description adds real semantic value by explaining the default shallow-merge behavior and the branch-replacement risk, which clarifies how the settings and merge parameters interact.

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 clearly states the tool updates a block theme's global styles, naming the concrete areas affected (palette, typography, spacing, per-block styling) and the site-wide immediate effect. It distinguishes itself from related siblings like get_global_styles, diff_global_styles, and reset_template_customization by being the update operation on this resource.

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 actionable guidance: read current styles first and understand the merge behavior before writing. It clearly explains when to pass merge: true versus the default top-level replace behavior, though it does not explicitly name the alternative tool to use for reading.

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