Skip to main content
Glama

Delete a user

wp_delete_user
Destructive

Delete a user account. With reassign_to, the user's posts and links pass to that user; without it, WordPress deletes the user's links and entries of post types removed with their author (posts and pages among them; these go to the trash where it is on, the rest is deleted). On multisite the account is only removed from this site, its content handled the same way. Needs delete_users and the right to delete this user; the last administrator is refused. An administrator loses that role first and is deleted after; if the deletion fails, the role is given back and the error says whether that worked; if the account was removed and only a plugin's code after it failed, the answer is deleted with a warning. The call is refused (ab_mcp_busy) while another role change or user deletion runs through AlphaBridge; changes made in wp-admin are not part of these checks. Returns deleted and id. The account deletion is permanent; no undo point is recorded. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
idYesId of the user to delete.
reassign_toNoId of the user who inherits the deleted user's content: another existing user of this site, else the call is refused and nothing is deleted. Omitted or 0: WordPress deletes or trashes it as described above.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / id / description
      Added value: +"Id of the user to delete."
    • changedInput schema / properties / reassign_to / description
      Previous value: -"User id to inherit content."New value: +"Id of the user who inherits the deleted user's content: another existing user of this site, else the call is refused and nothing is deleted. Omitted or 0: WordPress deletes or trashes it as described above."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Goes far beyond the destructiveHint annotation: discloses that deletion is permanent with no undo point, the multisite scoping (only removed from this site), the last-admin refusal, the admin role-strip/rollback sequence, partial-failure semantics (deleted-with-warning), and the ab_mcp_busy concurrency guard. This is exactly the contextual risk detail an agent needs before calling a destructive tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and the reassign/no-reassign fork, and every sentence carries operational information. The dense parenthetical clauses and long single paragraph make it slightly harder to scan than it could be, but there is little true waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description states the return contract ('Returns deleted and id'), covers permissions, failure modes, multisite scope, and the AlphaBridge forwarding boundary. Nothing material is missing for a destructive, non-idempotent, non-open-world tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics: reassign_to must reference an existing user or the call is refused with nothing deleted, and omission/0 triggers the trash-or-delete cascade described above. The inheritance rules give an agent decision guidance the schema's field text only partly covers.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a precise verb+resource ('Delete a user account') and immediately scopes it against siblings like wp_get_user and wp_update_user_meta by describing exactly what is removed versus reassigned. An agent can tell this is the destructive account-removal tool without reading further.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly contrasts the two modes: 'With reassign_to... without it, WordPress deletes the user's links and entries of post types removed with their author.' It also states prerequisites (delete_users capability, right to delete this user, last administrator refused). No sibling alternatives are named, but the decision context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources