Skip to main content
Glama

Activate a plugin

wp_activate_plugin
Destructive

Activate an installed plugin on this site, named by its file as wp_list_plugins lists it (e.g. akismet/akismet.php); installing is wp_install_plugin, network-wide activation on a multisite network wp_network_activate_plugin. Needs activate_plugins. A plugin taken back after a failed check is deactivated without its deactivation routine, as WordPress does after a fatal error. Activating is checked like an update: test requests check the home page, this MCP endpoint, wp-admin/admin-post.php and the dashboard before and after, logged in as this connection's account (where a security plugin refuses that login, the dashboard is left out and the answer says so). Where a target then shows a new fatal error, stops answering, or this MCP endpoint loses its own answer, the activation is taken back in the same call; the answer, an error, names the error with file and line, and the files stay as they are, so a corrected version can be activated again. Code has to let WordPress finish every request: code that ends the answer itself (fastcgi_finish_request(), or exit in the shutdown action) is taken back too, since the test cannot tell it from a broken one, and background work belongs in WP-Cron. A fatal error that was there before keeps the activation with a warning; a site that cannot reach itself is activated without a test, with the warning "not checked". Where code on every request filters the active plugins or the theme, so the site does not load what WordPress lists as active, the answer says so and the list stays as it was. One activation, update or deploy into running code runs at a time; a second is refused and changes nothing. Not checked: other wp-admin screens, cron, AJAX, code that runs only on some pages or for other users; what an activation routine writes to the database stays. Forwarded by AlphaBridge Connect to the one site this connection reaches.

Input Schema

NameRequiredDescriptionDefault
pluginYesPlugin identifier as wp_list_plugins returns it in file: folder and main file, e.g. "akismet/akismet.php" (a single-file plugin as "hello.php").

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / plugin / description
      Added value: +"Plugin identifier as wp_list_plugins returns it in file: folder and main file, e.g. \"akismet/akismet.php\" (a single-file plugin as \"hello.php\")."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only flag destructive/non-idempotent; the description goes far beyond by disclosing the full rollback protocol: pre/post test requests against four targets, automatic deactivation (without deactivation routine) on a new fatal error or lost endpoint response, error answers naming file and line with files left untouched, and pre-existing fatals keeping the activation with a warning. It also scopes what is NOT checked (other admin screens, cron, AJAX, other users) and notes that activation-routine DB writes persist — unusually complete behavioral context for a destructive mutation.

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 correctly: purpose, identifier format, and sibling routing come first, with caveats after. It is long and sentences are dense (the fastcgi_finish_request/exit-in-shutdown clause is niche), but nearly every sentence carries decision-relevant information, so the length is largely justified rather than padded.

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, non-idempotent, no-output-schema tool, the description covers permissions, concurrency, rollback, error-answer content, warnings, and known blind spots. There is no output schema, and the description compensates by describing what the answer/error will contain, leaving no significant gap for correct invocation.

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% and the schema already gives the folder/main-file format with examples, so the description is not required to carry this. It still adds a small amount by tying the value to wp_list_plugins as the source of truth, telling the agent where to obtain a valid identifier rather than guessing.

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 ("Activate an installed plugin on this site") and immediately pins the identifier format to the same one wp_list_plugins returns. It explicitly distinguishes itself from wp_install_plugin and wp_network_activate_plugin, so an agent can pick the right tool 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?

Names both competing siblings and the condition that selects each: installing goes to wp_install_plugin, multisite network activation goes to wp_network_activate_plugin. It also states prerequisites ("Needs activate_plugins") and a runtime constraint (only one activation/update/deploy at a time, a second is refused), which is exactly the guidance an agent needs before calling.

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