Skip to main content
Glama

Set a Customizer setting

set_theme_mod

Set a WordPress theme customization (theme mod) by key and value. Check existing mods with get_theme_mods first to ensure valid input.

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.
valueNoNew 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.
Behavior3/5

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

Annotations already declare readOnlyHint=false, so the write nature is expected. The description adds behavioral context by noting that validity depends on the theme and that the agent should read existing mods first. However, it does not disclose side effects, permissions, or whether overwriting an existing key has any consequence beyond setting the value. Since annotations cover the safety profile and the description adds the theme-dependency caveat, this is adequate but not rich.

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. The second sentence delivers essential guidance (read get_theme_mods first, theme-dependent validity) without redundancy. Every word earns its place; no filler or irrelevant detail.

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 write tool with no output schema and minimal annotations, the description covers the essential pre-conditions (checking existing mods), value type semantics, and site selection. It does not describe return values, but that is not critical for a setter. The theme-dependency warning is sufficient to prevent naive misuse. Overall, it is complete for the tool's complexity.

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 coverage is 100%, so all parameters are documented. The description adds valuable type guidance: 'Types matter: a logo expects an attachment ID, a color expects a hex string.' It also explains site_id behavior (automatic selection vs. default site, and reference to list_sites). This goes beyond the schema and aids correct invocation, earning a score above the baseline.

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

Purpose4/5

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

The description states a clear verb and resource: 'Write one Customizer setting (theme mod) for the active theme.' It distinguishes from related tools like set_option by specifying Customizer theme mods, and mentions get_theme_mods as a companion. The purpose is unambiguous and does not overlap with siblings like update_site_settings.

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 explicit guidance on what to do before calling: 'read get_theme_mods first to see the keys it uses.' It also warns that validity depends on the theme, setting context for safe use. It does not name alternatives or say when not to use it, but the prerequisite and theme-dependence provide clear usage instruction.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alokemajumder/wpxmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server