'object', 'properties' => [ 'plan_slug' => [ 'type' => 'string', 'description' => 'Plan slug identifier', ], 'phase' => [ 'type' => 'string', 'description' => 'Phase identifier (number or name)', ], ], 'required' => ['plan_slug', 'phase'], ]; } public function handle(array $args, array $context = []): array { $workspaceId = $context['workspace_id'] ?? null; if ($workspaceId === null) { return $this->error('workspace_id is required'); } try { $phase = GetPhase::run( $args['plan_slug'] ?? '', $args['phase'] ?? '', (int) $workspaceId, ); return $this->success([ 'phase' => [ 'order' => $phase->order, 'name' => $phase->name, 'description' => $phase->description, 'status' => $phase->status, 'tasks' => $phase->tasks, 'checkpoints' => $phase->getCheckpoints(), 'dependencies' => $phase->dependencies, ], ]); } catch (\InvalidArgumentException $e) { return $this->error($e->getMessage()); } } }