Skip to main content
Glama

Activate a plugin network-wide

wp_network_activate_plugin
Destructive

Multisite: network-activate a plugin on every site of the network (wp_activate_plugin activates on one site, except a plugin marked Network: true, which WordPress activates network-wide either way). Requires a multisite network and a network super admin. The test requests go to the current site only; the plugin's code is the same on every site, and the other sites are not requested. A plugin taken back after a failed check is deactivated network-wide without its deactivation routine, as WordPress does after a fatal error. Returns network_activated, plugin and what the check reports. 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 file as wp_list_plugins lists it, e.g. akismet/akismet.php.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / plugin / description
      Previous value: -"Plugin file, e.g. akismet/akismet.php."New value: +"Plugin file as wp_list_plugins lists it, e.g. akismet/akismet.php."
  2. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only say destructiveHint=true and idempotentHint=false; the description goes far beyond by disclosing the automatic rollback on fatal error, that rollback deactivates without the deactivation routine, the pre/post test-request surface, the 'not checked' fallback for unreachable sites, and that database writes from the activation routine persist. This is exactly the extra context an agent needs before invoking 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.

Conciseness3/5

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

The key distinction and prerequisites are front-loaded, which is good, but the body is a dense ~350-word run-on covering many edge cases (fastcgi_finish_request, exit in shutdown, theme filters) in prose rather than structure. Most content is safety-relevant, but the lack of bullets or paragraph breaks makes it harder to scan than it needs to be.

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 multisite operation with no output schema, the description covers prerequisites, rollback semantics, failure modes, return fields ('Returns network_activated, plugin and what the check reports'), and known blind spots. Nothing an agent needs in order to call it safely is missing.

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 there is a single required parameter already documented in the schema ('Plugin file as wp_list_plugins lists it'). The description adds no format or syntax detail beyond that, so the baseline 3 applies.

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+scope: 'Multisite: network-activate a plugin on every site of the network', and immediately contrasts it with the sibling wp_activate_plugin ('activates on one site'). An agent can pick between the two without opening either 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?

Explicitly names the alternative tool and the condition that selects it, and states prerequisites ('Requires a multisite network and a network super admin'). It also spells out exclusions ('Not checked: other wp-admin screens, cron, AJAX...') and the concurrency rule ('One activation... runs at a time; a second is refused').

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