Delete User
Permanently deletes a user account, given their user ID. Optionally pass reassign with another user's ID to move their authored content to that user; otherwise their content is deleted too. Destructive and irreversible.
| Property | Value |
|---|---|
| Ability slug | mosmcp/delete-user |
| Wire tool name | mosmcp__delete-user |
| Category | Users & Roles (mosmcp-users) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | delete_users |
| Minimum default role | Administrator |
| Annotations | readOnly: false · destructive: true · idempotent: false · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | integer (min 1) | Yes | — | The user ID to delete (required). |
| reassign | integer (min 1) | — | Optional user ID to reassign the deleted user's content to. |
Output schema
| Field | Type | Required |
|---|---|---|
| id | integer | Yes |
| deleted | boolean | Yes |
Example
Sample prompt
Delete user #57 and give all their posts to user #42.
Example request (json)
{
"jsonrpc": "2.0",
"id": 176,
"method": "tools/call",
"params": {
"name": "mosmcp__delete-user",
"arguments": {
"input": {
"id": 57,
"reassign": 42
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 176,
"result": {
"isError": false,
"structuredContent": {
"id": 57,
"deleted": true
}
}
}
Edge cases / errors
- reassign omitted → the user's posts and links are deleted along with the account. This is permanent.
- Trying to delete your own account → mosmcp_cannot_delete_self.
- No user with that id → mosmcp_user_not_found; no delete rights over that user (e.g. a super admin) → mosmcp_cannot_delete.
- WordPress fails to delete (e.g. an invalid reassign target) → mosmcp_delete_failed.
| << Previous | Next >> |
|---|---|
| Create New User | Delete User Metadata |
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.