We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ac3c28 commit 931ca42Copy full SHA for 931ca42
src/MCP/Servers/WP_CLI/Tools/CliCommands.php
@@ -5,7 +5,6 @@
5
use McpWp\MCP\Server;
6
use Psr\Log\LoggerInterface;
7
use WP_CLI;
8
-use WP_CLI\Dispatcher\CompositeCommand;
9
use WP_CLI\SynopsisParser;
10
11
/**
@@ -34,7 +33,14 @@ public function get_tools(): array {
34
33
$tools = [];
35
36
foreach ( $commands as $command ) {
37
- [$command] = WP_CLI::get_runner()->find_command_to_run( [ $command ] );
+ $result = WP_CLI::get_runner()->find_command_to_run( [ $command ] );
+
38
+ // Command not found/installed.
39
+ if ( is_string( $result ) ) {
40
+ continue;
41
+ }
42
43
+ [ $command ] = $result;
44
45
46
* Command class.
0 commit comments