Skip to main content
Glama

Run WP-CLI Command

wp_cli_run

Execute WP-CLI commands on Local by Flywheel WordPress sites to manage plugins, options, core, and users. Write operations require WPCLI_ALLOW_WRITES=true; eval, eval-file, and shell are blocked.

Instructions

Execute a WP-CLI command against a Local by Flywheel WordPress site. Commands like "plugin list", "option get siteurl", "core version" are always allowed. Write commands require WPCLI_ALLOW_WRITES=true. Commands "eval", "eval-file", and "shell" are blocked for security.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoAdditional arguments to pass to the command
siteNoSite name, ID, or domain to target. Uses SITE_NAME/SITE_ID env var if not specified.
formatNoOutput format (e.g., "json" for structured data). Only applies to commands that support it (list, get, search). Do not use with write commands like create, update, delete.
commandYesWP-CLI subcommand to run (e.g., "plugin list", "option get siteurl", "core version", "user list")
Behavior4/5

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

Discloses that arbitrary WP-CLI commands can be executed with constraints: writes require an environment variable and certain commands are blocked for security. This adds significant behavioral context beyond the generic annotations (readOnlyHint=false, destructiveHint=false). No contradiction is present.

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?

Three sentences, each carrying essential information: purpose, allowed commands, and write/security constraints. No wasted words and effectively 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?

Covers the key aspects of the tool: allowed commands, write gate, and blocked commands. With no output schema, a note about return value would improve completeness, but the description is adequate for a command runner with well-documented parameters.

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?

The schema already describes all 4 parameters (100% coverage), giving a baseline of 3. The description enriches parameter understanding by specifying allowed command examples and warning that format should not be used with write commands, adding value beyond the schema.

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 a WP-CLI command against a Local by Flywheel WordPress site', specifying both the verb and resource. It also lists example commands and security restrictions, which distinguishes it from sibling tools like wp_list_sites or mysql_query.

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?

Provides clear context: read-only commands are always allowed, write commands require WPCLI_ALLOW_WRITES=true, and eval/eval-file/shell are blocked. However, it does not explicitly name alternative tools for the blocked cases, so it falls short of the highest bar.

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/teamchrisfromthelc/local-wp-mcp'

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