Set Post to Private
Sets a post to private status, making it visible only to administrators and editors.
| Property | Value |
|---|---|
| Ability slug | mosmcp/post-set-private |
| Wire tool name | mosmcp__post-set-private |
| Category | Posts (mosmcp-posts) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | publish_posts |
| Minimum default role | Author |
| Annotations | readOnly: false · destructive: false · idempotent: false · openWorld: true |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | integer (min 1) | Yes | — | The ID of the post to make private. |
Output schema
| Field | Type | Required |
|---|---|---|
| id | integer | Yes |
| title | string | Yes |
| previous_status | string | Yes |
| new_status | string | Yes |
| edit_url | string |
Example
Sample prompt
Make post 42 private so only editors and admins can see it.
Example request (json)
{
"jsonrpc": "2.0",
"id": 27,
"method": "tools/call",
"params": {
"name": "mosmcp__post-set-private",
"arguments": {
"input": {
"id": 42
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 27,
"result": {
"isError": false,
"structuredContent": {
"id": 42,
"title": "Internal Pricing Notes",
"previous_status": "publish",
"new_status": "private",
"edit_url": "https://example.com/wp-admin/post.php?post=42&action=edit"
}
}
}
Edge cases / errors
- Post already private → refused with already_private.
- Post in the trash → refused with post_trashed; restore it first.
- id that is not a post → post_not_found.
| << Previous | Next >> |
|---|---|
| Set Post to Pending Review | Trash 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.