Trash Page


Moves a page to the trash. The page is recoverable and can be restored later.

Property Value
Ability slug mosmcp/page-trash
Wire tool name mosmcp__page-trash
Category Pages (mosmcp-pages)
Plan Free

 

Required access

Requirement Value
Capability delete_page (checked against the specific page)
Minimum default role Editor
Annotations readOnly: false · destructive: true · idempotent: true · openWorld: true

 

Input schema

Field Type Required Default Description
id integer (min 1) Yes — The ID of the page to move to trash.

 

Output schema

Field Type Required
id integer Yes
title string Yes
previous_status string
new_status string Yes
restorable boolean Yes

 

Example

Sample prompt
Move the old 'Spring Promo' page to the trash.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 53,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__page-trash",
    "arguments": {
      "input": {
        "id": 42
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 53,
  "result": {
    "isError": false,
    "structuredContent": {
      "id": 42,
      "title": "Spring Promo",
      "previous_status": "publish",
      "new_status": "trash",
      "restorable": true
    }
  }
}

 

Edge cases / errors

  • The page is already in the trash → refused with already_trashed.
  • id is not a page → refused with page_not_found; lacking delete rights on that page → permission denied.
  • WordPress declines to trash it → trash_failed.
  • The page is recoverable with mosmcp/page-restore, which returns it to its previous status.

 


<< Previous Next >>
Set Page to Private Unpublish Page

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.