wp_cli
Run WP-CLI commands against the active WordPress Playground instance to inspect or modify posts, options, plugins, themes, users, and database state; add unsupported commands as blueprint steps.
Instructions
Run a WP-CLI command against the active Playground instance. The command is executed via a PHP bridge that translates common WP-CLI commands into WordPress function calls. Supports: option, post, plugin, theme, user, site, db, eval, transient, menu, search-replace. For unsupported commands, include them as wp-cli steps in the blueprint.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"command": "<command>"
},
"name": "wp_cli"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The WP-CLI command to run (with or without the "wp" prefix). Examples: "post list --format=json", "option get blogname", "plugin list" |