Skip to main content
Glama

Install a plugin

wp_install_plugin
Destructive

Install a WordPress.org plugin by slug and optionally activate it, with automatic rollback if activation worsens site health.

Instructions

Install a plugin from the WordPress.org directory by slug, optionally activating it. Needs install_plugins, and activate_plugins for activate (without it the plugin is installed and activated stays false); refused when DISALLOW_FILE_MODS is set. Returns installed, plugin (its file, e.g. akismet/akismet.php), activated and version, plus what the activation check reports; no undo point is recorded. Where its folder exists already, nothing is changed and the answer names the version installed; an installed plugin is brought to a newer version with wp_update_plugin. With activate, the activation is checked as with wp_activate_plugin and wp_activate_theme: where the site does worse with it active, it is taken back in the same call, and the answer, an error, names the error with file and line; what was installed stays installed.

Input Schema

NameRequiredDescriptionDefault
slugYeswordpress.org plugin slug, e.g. "akismet".
activateNotrue activates the plugin after install (needs activate_plugins). Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv4.10.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the destructiveHint/openWorldHint annotations: discloses that no undo point is recorded, that a failed activation health check is rolled back in the same call while the install persists, and that the error carries file and line. That is exactly the mutation-safety context 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?

Purpose and constraints are front-loaded and nearly every clause carries information. The final sentence is a dense run-on that packs rollback, error format, and persistence into one chain, costing some readability.

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?

With no output schema, the description still enumerates the return fields (installed, plugin file path, activated, version) and the activation-check report, plus error behavior and edge cases. Nothing material is missing for a 2-parameter destructive 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 both parameters are already documented; the description still adds meaning by tying `activate` to the activate_plugins capability and to the post-activation health-check/rollback behavior. Only marginal gain over the schema, so not a 5.

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 + resource plus the source constraint ("from the WordPress.org directory by slug") and the optional activation, which implicitly separates it from wp_install_plugin_zip. An agent knows exactly what gets installed and from where without opening the 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?

Names the required capabilities (install_plugins, activate_plugins), the refusal condition (DISALLOW_FILE_MODS), and the correct alternative for the upgrade case (wp_update_plugin). It also defines the no-op case when the folder already exists, so the agent knows when this call accomplishes nothing.

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