pressable_run_wp_cli
Execute WP-CLI commands on WordPress sites through the Pressable MCP Server to manage plugins, clear cache, and perform administrative tasks.
Instructions
Run WP-CLI commands on a specific site. Commands are prefixed with "wp" automatically.
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": {
"id": "<id>",
"commands": "<commands>"
},
"name": "pressable_run_wp_cli"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| commands | Yes | List of WP-CLI commands (e.g., ["plugin list", "cache flush"]) |
Implementation Reference
- tools/automation.js:19-21 (handler)The handler function for 'pressable_run_wp_cli' that executes the WP-CLI commands via the API.
handler: async (args) => { return await api.post(`/sites/${args.id}/wordpress/wpcli`, { commands: args.commands }); } - tools/automation.js:7-18 (schema)The input schema defining the required 'id' and 'commands' parameters for 'pressable_run_wp_cli'.
inputSchema: { type: 'object', properties: { id: { type: 'string' }, commands: { type: 'array', items: { type: 'string' }, description: 'List of WP-CLI commands (e.g., ["plugin list", "cache flush"])' } }, required: ['id', 'commands'] }, - tools/automation.js:4-22 (registration)The full tool definition and registration for 'pressable_run_wp_cli'.
{ name: 'pressable_run_wp_cli', description: 'Run WP-CLI commands on a specific site. Commands are prefixed with "wp" automatically.', inputSchema: { type: 'object', properties: { id: { type: 'string' }, commands: { type: 'array', items: { type: 'string' }, description: 'List of WP-CLI commands (e.g., ["plugin list", "cache flush"])' } }, required: ['id', 'commands'] }, handler: async (args) => { return await api.post(`/sites/${args.id}/wordpress/wpcli`, { commands: args.commands }); } },