Skip to main content
Glama

Activate Theme

wp_activate_theme
Destructive

Safely activate a WordPress theme with automatic health check. After switching, the site's front page is fetched to verify it loads correctly. If a fatal error, white screen, or HTTP 500 is detected, the previous theme is restored automatically within seconds. The user's site is never left broken. Use wp_get_theme_preview_url first to let the user preview before activating.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_idNoSite ID to target (optional if you have only one connected site)
stylesheetYesTheme slug to activate (e.g. "my-child-theme")

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

The description adds rich behavioral context beyond the annotations: it explains the health-check mechanism (fetch the front page), the specific failure triggers (fatal error, white screen, HTTP 500), and the automatic rollback to the previous theme. This meaningfully elaborates on the destructiveHint=true annotation by showing the safety net that mitigates it.

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

Conciseness4/5

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

Core action and safety behavior are front-loaded, followed by the preview recommendation, in four tight sentences. Slightly verbose with a rhetorical flourish ('never left broken'), but nearly every sentence carries actionable information.

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 destructive mutation tool with no output schema, the description is complete: it covers what happens on success and failure, the rollback guarantee, and the recommended preceding step. Nothing an agent needs to invoke it safely is missing.

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 both the site_id and stylesheet parameters are fully documented in the schema. The description adds no additional syntax or format detail beyond the schema, which is the expected baseline when the schema does the heavy lifting.

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?

States a specific verb (activate) and resource (WordPress theme) and immediately distinguishes itself from siblings like wp_install_theme and wp_update_theme by highlighting the automatic health check. An agent can tell exactly what this tool does and how it differs from installing or updating a theme.

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?

Explicitly recommends running wp_get_theme_preview_url first so the user can preview before activating, which gives a clear ordering/context. It lacks explicit when-not guidance or safety framing on when activation is inappropriate, so it falls just short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources