Skip to main content
Glama

wp_cli_run

Destructive

Execute WP-CLI commands on WordPress sites via SSH. Destructive operations require a confirmation flow to prevent unintended changes.

Instructions

Execute an arbitrary wp-cli command on a site via SSH. The wp prefix and --path are added automatically — pass only the args (e.g. 'post list --post_type=page'). Destructive commands (delete, drop, search-replace without --dry-run, plugin deactivate/uninstall) require a two-call confirmation flow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
site_idNo
argsYesWP-CLI args without leading 'wp', e.g. 'post list --post_type=page'
timeout_msNo
confirmationNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYes
commandYes
stdoutNo
stderrNo
exit_codeNo
duration_msNo
destructive_pattern_detectedNo
confirmation_tokenNo
expires_in_secondsNo
Behavior4/5

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

Annotations already indicate destructiveHint=true, and the description adds the crucial two-call confirmation flow for destructive commands. It also discloses that the 'wp' prefix and '--path' are added automatically, providing behavioral insight beyond annotations.

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

Conciseness5/5

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

Two concise sentences that immediately convey the tool's purpose and key usage nuances. No wasted words, and critical information is front-loaded.

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

Completeness4/5

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

Given the tool's complexity—4 parameters, destructive hint, and an output schema—the description covers execution method, automatic prefix, destructive confirmation, and a usage example. It avoids explaining return values (covered by output schema) but could mention that 'site_id' is optional and how 'timeout_ms' relates to execution.

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?

With only 25% schema description coverage, the description adds value by explaining how to format the 'args' parameter and implicitly describing the 'confirmation' parameter through the confirmation flow. However, 'site_id' and 'timeout_ms' are not elaborated upon.

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?

The description clearly states 'Execute an arbitrary wp-cli command on a site via SSH' with specific verb and resource. It distinguishes from sibling tools by noting that prefix is added automatically and that arbitrary commands are accepted, which sets it apart from the more specialized wp_* tools.

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?

The description provides an example argument and notes that destructive commands require a two-call confirmation flow, giving clear context for when special handling is needed. However, it does not explicitly state when to prefer this tool over dedicated sibling tools like wp_plugin_list.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mogacode-ma/elementor-mcp-agent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server