Trash Custom Content Item


Moves a custom content item to the trash, where it can be restored.

Property Value
Ability slug mosmcp/cpt-trash
Wire tool name mosmcp__cpt-trash
Category Custom Content (mosmcp-cpt)
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: false

 

Input schema

Field Type Required Default Description
post_type string (min length 1) Yes — Which custom content type to work with, as reported by the list-types ability — for example "service" or "team_member".
id integer (min 1) Yes — The ID of the item.

 

Output schema

Field Type Required Description
id integer Yes
post_type string
status string Yes
warnings object[] Non-fatal issues encountered while running.
warnings[].code string
warnings[].message string
warnings[].context string

 

Example

Sample prompt
Move the old 'Legacy Support' service to the trash.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 149,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__cpt-trash",
    "arguments": {
      "input": {
        "post_type": "service",
        "id": 33
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 149,
  "result": {
    "isError": false,
    "structuredContent": {
      "id": 33,
      "post_type": "service",
      "status": "trash",
      "warnings": []
    }
  }
}

 

Edge cases / errors

  • Item already in the trash → already_trashed.
  • WordPress refuses to trash it → trash_failed.
  • Needs delete permission on this specific item; it can be restored later with the restore ability.

 


<< Previous Next >>
Set Custom Field Update Custom Content Item

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.