Restore Custom Content Item
Restores a custom content item from the trash to its previous status.
| Property | Value |
|---|---|
| Ability slug | mosmcp/cpt-restore |
| Wire tool name | mosmcp__cpt-restore |
| 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: false · 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
Bring back the 'Legacy Support' service from the trash.
Example request (json)
{
"jsonrpc": "2.0",
"id": 144,
"method": "tools/call",
"params": {
"name": "mosmcp__cpt-restore",
"arguments": {
"input": {
"post_type": "service",
"id": 33
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 144,
"result": {
"isError": false,
"structuredContent": {
"id": 33,
"post_type": "service",
"status": "draft",
"warnings": []
}
}
}
Edge cases / errors
- Item isn't in the trash → not_trashed.
- WordPress couldn't restore it → restore_failed.
- The restored status is whatever WordPress restores to (usually draft on current WordPress versions), not necessarily published.
| << Previous | Next >> |
|---|---|
| Remove Terms From Custom Content | Set Custom Content Featured Image |
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.