Skip to main content
Glama
UpgradePathsResource.php1.75 kB
<?php declare(strict_types=1); namespace GoldenPathDigital\LaravelAscend\Resources; use GoldenPathDigital\LaravelAscend\Documentation\KnowledgeBaseService; use GoldenPathDigital\LaravelAscend\Server\Mcp\Contracts\ResourceInterface; final class UpgradePathsResource implements ResourceInterface { /** @var KnowledgeBaseService */ private $knowledgeBase; public function __construct( KnowledgeBaseService $knowledgeBase ) { $this->knowledgeBase = $knowledgeBase; } public function name(): string { return 'ascend://knowledge-base/upgrade-paths'; } /** * @return array<string, mixed> */ public function toArray(): array { $identifiers = $this->knowledgeBase->listUpgradePathIdentifiers(); $paths = array_map(function (string $identifier) { $path = $this->knowledgeBase->getUpgradePath($identifier); return [ 'identifier' => $identifier, 'from_version' => $path['from'] ?? 'unknown', 'to_version' => $path['to'] ?? 'unknown', 'steps' => $path['steps'] ?? [], 'estimated_complexity' => $path['complexity'] ?? 'medium', 'uri' => "ascend://upgrade-paths/{$identifier}", ]; }, $identifiers); return [ 'uri' => $this->name(), 'name' => 'Upgrade Paths Index', 'description' => 'Index of all available Laravel upgrade paths with step-by-step guidance', 'mimeType' => 'application/json', 'content' => json_encode([ 'total' => count($paths), 'paths' => $paths, ], JSON_PRETTY_PRINT), ]; } }

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/aarongrtech/laravel-ascend'

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