Skip to main content
Glama

Delete a plugin

wp_delete_plugin
Destructive

Permanently remove an installed WordPress plugin by its file path, previewing the change with a confirm token first; an active plugin is deactivated and its uninstall routine runs.

Instructions

Delete an installed plugin by its file path as wp_list_plugins lists it (e.g. akismet/akismet.php); an active plugin is deactivated first, and WordPress runs the plugin's uninstall routine, which can remove its settings and data. Permanent: no undo point is recorded; switching a plugin off without removing it is wp_deactivate_plugin. Returns deleted and plugin. Needs delete_plugins; refused when DISALLOW_FILE_MODS is set. AlphaBridge itself (AlphaBridge MCP, AlphaBridge MCP Pro, the owner drop-in) is refused here, because deleting it would end this connection or take tools away from it, and its uninstall can remove the connections, settings and undo points as well; it is deleted in wp-admin under Plugins. Runs in two steps: a call without confirm_token changes nothing and returns a preview with a confirm_token, and the same call with that token runs it. This guards against a call nobody meant; it does not make the change reversible.

Input Schema

NameRequiredDescriptionDefault
pluginYesExact plugin file of an installed plugin as wp_list_plugins lists it, e.g. "akismet/akismet.php". A folder name alone or an unknown file is refused.
confirm_tokenNoConfirmation from the preview: a call without it changes nothing and answers with a preview and a confirm_token, and the same arguments with that token run the tool. A token is valid for 10 minutes and only while what it covers is unchanged.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.10.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond destructiveHint=true by disclosing what actually gets destroyed (the plugin's uninstall routine can remove settings and data), that an active plugin is deactivated first, that no undo point is recorded, and why self-deletion is blocked. It also explains the two-step confirm flow and correctly notes it guards against accidental calls without making the change reversible.

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, the identifier format and the permanence warning, which is the right order for a destructive tool. It is a single dense block, though, and the two-step confirm flow is explained in both the description and the schema, which is redundant weight in an already long paragraph.

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?

For a destructive mutation with no output schema, the description covers everything an agent needs: identifier source, precondition capability, environment refusals, side effects of the uninstall routine, irreversibility, and the confirmation handshake. It even names the return keys (deleted, plugin).

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

Parameters3/5

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

Schema coverage is 100% and both parameters are already fully documented, including the example path, the folder-name refusal, and the 10-minute token validity. The description largely restates the path format and confirm flow, adding only the cross-reference to wp_list_plugins as the source of a valid value — correct baseline 3.

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?

States a specific verb and resource (delete an installed plugin) plus the exact identifier format, with a concrete example path. It explicitly separates itself from wp_deactivate_plugin and points at wp_list_plugins as the source of the identifier, so an agent can pick it out of a 60+ sibling toolset without opening any schema.

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

Usage Guidelines5/5

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

Gives the alternative and the condition that selects it ("switching a plugin off without removing it is wp_deactivate_plugin"), states the prerequisite capability (delete_plugins), the environment blocker (refused when DISALLOW_FILE_MODS is set), and an explicit exclusion (AlphaBridge itself, with the reason and the wp-admin route instead). Nothing about when to use or avoid is left to inference.

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

Deploy Server

Other Tools