Trash Post


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

Property Value
Ability slug mosmcp/post-trash
Wire tool name mosmcp__post-trash
Category Posts (mosmcp-posts)
Plan Free

 

Required access

Requirement Value
Capability delete_post (checked against the specific post)
Minimum default role Contributor
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 post 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 post 42 to the trash.

Example request (json)

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

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 28,
  "result": {
    "isError": false,
    "structuredContent": {
      "id": 42,
      "title": "Old Announcement",
      "previous_status": "publish",
      "new_status": "trash",
      "restorable": true
    }
  }
}

 

Edge cases / errors

  • Post already in the trash → refused with already_trashed.
  • WordPress refuses to trash it (e.g. a plugin blocks it) → trash_failed.
  • id that is not a post → post_not_found. The post can be brought back with mosmcp/post-restore.

 


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

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.