Skip to main content
Glama

Set a Customizer setting

set_theme_mod

Change a WordPress theme's Customizer setting by writing one theme mod value. Provide the key and new value to update options such as logo or colors.

Instructions

Write one Customizer setting (theme mod) for the active theme. What is valid depends entirely on the theme — read get_theme_mods first to see the keys it uses.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesTheme mod name, e.g. "custom_logo" or a theme-specific key.
valueYesNew value. Types matter: a logo expects an attachment ID, a color expects a hex string.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 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
    • changedInput schema / required
      Previous value: -[
      -  "key"
      -]New value: +[
      +  "key",
      +  "value"
      +]
  2. First observedv1.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=false, openWorldHint=true, idempotentHint=false, destructiveHint=false. The description adds context beyond annotations: it warns that validity depends on the theme and instructs to read get_theme_mods first. It doesn't mention side effects like overwriting existing values, but the annotations cover the safety profile. A 4 is appropriate because the description adds meaningful behavioral context without contradicting annotations.

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 with zero waste. The core action is front-loaded, and the critical guidance (read get_theme_mods first) is included immediately. Every sentence earns its place.

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 simple write tool with 100% schema coverage and no output schema, the description is nearly complete. It covers the key risk (theme-dependent validity) and the prerequisite (get_theme_mods). It could mention that the operation overwrites an existing mod, but the annotations and schema already cover the basics. A 4 is fair.

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 value by explaining that value types matter (logo expects attachment ID, color expects hex string) and that site_id is optional with fallback behavior. This goes beyond the schema's basic descriptions.

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 writes one Customizer setting (theme mod) for the active theme, using a specific verb ('Write') and resource ('Customizer setting'). It distinguishes itself from get_theme_mods by explicitly telling the agent to read that first, and from other theme tools by focusing on theme mods.

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 to read get_theme_mods first to see valid keys, which is a clear when-to-use instruction. It also warns that validity depends entirely on the theme, setting expectations for exploration. This is strong guidance for an open-world tool.

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