Skip to main content
Glama

Activate a theme

activate_theme
Destructive

Activate a WordPress theme by specifying its stylesheet directory name. Immediately changes the live site's appearance for all visitors, requiring explicit confirmation before applying.

Instructions

Switch the site's active theme. This changes the entire front-end appearance immediately, and widget/menu assignments do not always carry across. Requires confirm: true. If you are iterating on a theme you are building, use the draft workflow and publish_draft_theme instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoRequired — this changes the live site's appearance for every visitor.
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.
stylesheetYesTheme directory name to activate.
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the description is not required to restate that. It adds valuable context beyond annotations: the immediate visual impact on the live site and the non-guarantee of widget/menu assignments carrying over. This is genuinely useful behavioral information that the schema and annotations do not convey.

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?

Three sentences with no filler. The primary purpose and immediate side effect are front-loaded, the required flag is called out early, and the alternative workflow is given in a single closing sentence. 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 single-action tool with destructive implications, the description covers the essential operational facts: what it does, its safety requirement (confirm), and the alternative for iteration. Given the schema fully documents all three parameters and annotations cover the safety profile, nothing critical is missing. A small gap is that it doesn't mention what happens on failure (e.g., invalid stylesheet) but that is minor for this tool.

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%, so the baseline is 3. The description mentions 'Requires confirm: true,' but the schema's confirm property already explains 'Required — this changes the live site's appearance for every visitor.' It adds no new meaning for site_id or stylesheet beyond what the schema provides.

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 'Switch the site's active theme,' a specific verb and resource that immediately conveys the core action. It goes on to state the consequence ('changes the entire front-end appearance immediately') and explicitly contrasts itself with the draft workflow, making it easy to tell apart from siblings like install_theme or publish_draft_theme.

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?

It explicitly states a hard prerequisite ('Requires confirm: true') and provides a clear when-not-to-use rule ('If you are iterating on a theme you are building, use the draft workflow and publish_draft_theme instead.'). This directly guides the agent toward the correct alternative in the relevant scenario.

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