Skip to main content
Glama

Publish a draft theme

publish_draft_theme
Destructive

Promote a draft theme to your live site. The current active theme is backed up first, so you can revert the change if needed.

Instructions

Promote a draft theme to the live site. The currently active theme is backed up first, so the change is reversible. This is the one step that changes what visitors see — everything before it is sandboxed. Requires confirm: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
themeNoDraft theme id to publish. Defaults to the most recent draft.
confirmNoRequired — this changes the live site.
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. Changed2 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
  2. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already mark destructiveHint=true, but the description adds valuable context: 'The currently active theme is backed up first, so the change is reversible.' It also clarifies the live-site impact and that prior steps are sandboxed, going beyond the annotation flags without contradicting them.

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 short sentences with no filler. The first sentence states the core action, the second provides the key safety behavior, and the third gives usage context and a hard requirement. Every sentence earns its place.

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 mutation tool with no output schema, the description covers the action, the live-site impact, reversibility, sandboxing context, and the confirmation requirement. An agent has enough information to decide to invoke it and to know the consequences.

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 schema already documents theme, confirm, and site_id. The description only reinforces that confirm must be true, which is already stated in the schema ('Required — this changes the live site'). It adds no new parameter-level detail.

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 ('Promote') and resource ('a draft theme to the live site'), making the operation unambiguous. It also adds 'This is the one step that changes what visitors see', which separates it from related draft/theme tools like list_draft_themes and activate_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?

The description gives clear context for when to use it: 'This is the one step that changes what visitors see — everything before it is sandboxed.' This implies the tool is for the final go-live action. It does not explicitly name an alternative or state when not to use it, so it stops 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.

Deploy Server

Other Tools