Skip to main content
Glama

Create a draft theme

create_draft_theme

Clone an installed theme into an isolated draft copy for safe editing. Preview on a private URL before publishing without affecting the live site.

Instructions

Clone an installed theme into an isolated draft copy that you can edit freely without touching the live site. Every theme edit should go through a draft: write files, preview them on a private tokenised URL, then publish_draft_theme when you are happy (which backs up the previous theme first). Omit from_theme to clone the currently active theme.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.
draft_nameNoHuman-readable name for the draft. Defaults to "<theme> (draft)".
from_themeNoStylesheet to clone. Defaults to the active theme.

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.7/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=true. The description adds the key behavioral detail that the draft is isolated and doesn't touch the live site, and that publishing backs up the previous theme. This context is valuable beyond the annotations and helps the agent understand the safety of the operation.

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 three sentences, each earning its place. It is front-loaded with the core purpose, then explains the workflow, and ends with a critical parameter nuance. No fluff, highly efficient.

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?

Given the tool's simplicity (3 params, none required) and the rich annotations, the description fully covers what an agent needs to call it correctly. It explains the purpose, the isolation, the workflow steps, and the default behavior for the optional parameter. No output schema is needed as the tool's return value is likely a draft identifier or status, not critical for invocation.

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 documents all parameters. The description adds semantics: it names the key parameter `from_theme` and explains that omitting it clones the active theme. This goes beyond the schema's 'Stylesheet to clone. Defaults to the active theme.' by clarifying the default behavior in context. The description also contextualizes the workflow around these parameters.

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 verb (Clone) and resource (installed theme into an isolated draft copy), and differentiates from siblings like publish_draft_theme and list_draft_themes. It explicitly positions this tool within the draft workflow.

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 states when to use this tool: 'Every theme edit should go through a draft', and provides a clear workflow: write files, preview, then publish. It also mentions the alternative publish_draft_theme with the backup behavior. This is excellent guidance.

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