$m->getName(), $class->getMethods())) . "\n"; $executeMethod = $class->getMethod('execute'); $attributes = $executeMethod->getAttributes(); echo "Attributes on execute method: " . count($attributes) . "\n"; foreach ($attributes as $attr) { echo " - " . $attr->getName() . "\n"; $instance = $attr->newInstance(); if ($instance instanceof \App\Framework\Console\ConsoleCommand) { echo " name: " . $instance->name . "\n"; echo " description: " . $instance->description . "\n"; } } } catch (Exception $e) { echo "❌ Error loading class: " . $e->getMessage() . "\n"; echo "Stack trace: " . $e->getTraceAsString() . "\n"; } echo "\nTesting if Discovery would find this file...\n"; // Test if file would be scanned by Discovery $pathProvider = new \App\Framework\Core\PathProvider('/var/www/html'); $fileScanner = new \App\Framework\Filesystem\FileScanner(); $pattern = new \App\Framework\Filesystem\ValueObjects\FilePattern('*.php'); $basePath = \App\Framework\Filesystem\FilePath::fromString('/var/www/html/src'); $files = $fileScanner->scan($basePath, $pattern); $mcpCommandFile = null; foreach ($files as $file) { if (strpos($file->getPath(), 'McpServerCommand.php') !== false) { $mcpCommandFile = $file; break; } } if ($mcpCommandFile) { echo "✅ McpServerCommand.php would be found by file scanner\n"; echo "File path: " . $mcpCommandFile->getPath() . "\n"; } else { echo "❌ McpServerCommand.php would NOT be found by file scanner\n"; }