Discard Theme Draft


Throws away every pending theme change. The live site is untouched, because the draft never affected it. Needs confirm set to true when the draft holds changes.

Property Value
Ability slug mosmcp/theme-draft-discard
Wire tool name mosmcp__theme-draft-discard
Category Theme: Draft and Publish (mosmcp-theme-draft)
Plan Free

 

Required access

Requirement Value
Capability edit_theme_options
Minimum default role Administrator (Shop manager too when WooCommerce is active)
Annotations readOnly: false · destructive: true · idempotent: true · openWorld: false

 

Input schema

Field Type Required Default Description
confirm boolean — Must be true when the draft holds changes, set only after the person has agreed.

 

Output schema

Field Type Required
discarded boolean Yes
files_removed boolean
change_count integer
notes string[]

 

Example

Sample prompt
Throw away all my unpublished theme changes.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 309,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__theme-draft-discard",
    "arguments": {
      "input": {
        "confirm": true
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 309,
  "result": {
    "isError": false,
    "structuredContent": {
      "discarded": true,
      "files_removed": true,
      "change_count": 2,
      "notes": [
        "The live site was never affected by the draft, so nothing visitors see has changed."
      ]
    }
  }
}

 

Edge cases / errors

  • No draft exists → refused with mosmcp_theme_draft_missing.
  • Draft holds changes and confirm is not true → refused with mosmcp_confirmation_required.
  • An empty draft, or a stale one left from a previously active theme, can be discarded; confirm is only needed when it holds changes.

 


<< Previous Next >>
Check Theme Draft Preview Theme Draft

For more information about the Secure MCP Server for WordPress plugin, explore the following resources:

Product Overview | Pricing | Try for Free | Documentation

If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.