Check Theme Draft


Tests that the site still loads with the pending theme changes applied — requesting wp-admin, the home page and the newest post and page with the draft in place, and catching any fatal PHP error or page that comes back empty. Other page types (404, archives, shop pages) are not loaded — without publishing anything. Also reports anything on the live site that changed since the draft started. Publishing runs this check itself; this is for finding problems early.

Property Value
Ability slug mosmcp/theme-draft-check
Wire tool name mosmcp__theme-draft-check
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: true · destructive: false · idempotent: true · openWorld: false

 

Input schema

Takes no input. Send "input": {} (or omit input).

 

Output schema

Field Type Required Description
ok boolean Yes True when every page loaded without a fatal error.
conclusive boolean False when at least one page could not be checked properly.
target string
checks object[] Yes
checks[].page string
checks[].status string "ok", "fatal" or "unverified".
checks[].http_status integer
checks[].message string
checks[].file string
checks[].line integer
note string
conflicts string[]
warnings string[]

 

Example

Sample prompt
Before I publish, check that my site still loads with the pending theme changes.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 308,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__theme-draft-check",
    "arguments": {
      "input": {}
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 308,
  "result": {
    "isError": false,
    "structuredContent": {
      "ok": true,
      "conclusive": true,
      "target": "draft",
      "checks": [
        {
          "page": "wp-admin",
          "status": "ok",
          "http_status": 200,
          "message": "",
          "file": "",
          "line": 0
        },
        {
          "page": "home page",
          "status": "ok",
          "http_status": 200,
          "message": "",
          "file": "",
          "line": 0
        }
      ],
      "note": "The site loads normally with the draft applied: wp-admin and home page all render without a fatal error. Other page types (such as 404, archive or shop pages) were not loaded.",
      "conflicts": [],
      "warnings": []
    }
  }
}

 

Edge cases / errors

  • No pending changes → refused with mosmcp_theme_draft_empty; stale draft → mosmcp_theme_draft_stale.
  • The site cannot request its own pages (loopback fails) → ok and conclusive are false with an explanatory note and no checks.
  • A page hits a fatal PHP error → that check has status "fatal" with the message, file and line.
  • Only wp-admin, the home page and the newest post and page are loaded; 404s, archives and shop pages are not tested.

 


<< Previous Next >>
Write Theme File Discard 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.