'object', 'properties' => [ 'slug' => [ 'type' => 'string', 'description' => 'Plan slug identifier', ], 'status' => [ 'type' => 'string', 'description' => 'New status', 'enum' => ['draft', 'active', 'paused', 'completed'], ], ], 'required' => ['slug', 'status'], ]; } public function handle(array $args, array $context = []): array { $workspaceId = $context['workspace_id'] ?? null; if ($workspaceId === null) { return $this->error('workspace_id is required'); } try { $plan = UpdatePlanStatus::run( $args['slug'] ?? '', $args['status'] ?? '', (int) $workspaceId, ); return $this->success([ 'plan' => [ 'slug' => $plan->slug, 'status' => $plan->status, ], ]); } catch (\InvalidArgumentException $e) { return $this->error($e->getMessage()); } } }