Skip to main content
Glama

Diff global styles against theme.json

diff_global_styles
Read-only

Identify user overrides in the WordPress Site Editor before editing theme.json or shipping updates. Shows JSON-path diffs of global styles, matched by slug, and lists custom templates and parts.

Instructions

Show exactly what the Site Editor has overridden in a block theme: a JSON-path diff of the user's global-styles customisations against the theme's own theme.json values (palette entries are matched by slug), plus every template and template part whose source is "custom" — edited in the Site Editor and therefore no longer following the theme's files. Use it before editing theme.json (a user override silently wins over file changes) or before shipping a theme update.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.
max_entriesNoCap on diff entries returned.
include_unchangedNoAlso list user values that merely restate the theme's value — harmless, but they pin the value so later theme.json changes will not show through.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds valuable behavioral context: it explains that the diff includes JSON-path entries, that palette entries are matched by slug, and that it also lists templates/parts with source 'custom'. It also discloses the 'silently wins' override behavior, which is a non-obvious consequence. It doesn't mention pagination or output format, but the output schema is absent and the description gives enough behavioral detail for a read-only inspection tool.

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?

The description is two sentences, front-loaded with the core purpose and then the use-case guidance. Every clause earns its place: the slug-matching detail, the custom-source template list, and the 'silently wins' warning are all high-value. No fluff or repetition of the title.

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

Completeness4/5

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

For a read-only diff tool with no output schema, the description covers what the tool does, what it returns (diff entries plus templates/parts), and when to use it. It doesn't describe the exact output structure or how to interpret a diff entry, but the tool's purpose is clear enough for an agent to invoke it and interpret results. The absence of an output schema raises the burden slightly, but the description is strong enough to earn a 4.

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?

Schema description coverage is 100%, so the schema already documents all three parameters. The description adds context for include_unchanged by explaining the 'pin the value' consequence, which is not in the schema. It doesn't add much for site_id or max_entries, but the schema covers them well, so the baseline 3 is exceeded by the added semantic value for include_unchanged.

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 states a specific verb ('Show'), a precise resource ('diff of the user's global-styles customisations against the theme's own theme.json values'), and the matching mechanism ('palette entries are matched by slug'). It also distinguishes itself from related theme tools by focusing on Site Editor overrides and custom templates, which is unique among the sibling tools.

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

Usage Guidelines5/5

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

The description explicitly says when to use it: 'before editing theme.json' and 'before shipping a theme update', and explains why (a user override silently wins over file changes). It also implies when not to use it (when you don't need to inspect overrides), and the sibling list contains no other diff tool, so the guidance is clear.

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