class RubyLLM::MCP::Roots

def active?

def active?
  @paths.any?
end

def add(path)

def add(path)
  @paths << path
  @coordinator.roots_list_change_notification
end

def initialize(paths: [], coordinator: nil)

def initialize(paths: [], coordinator: nil)
  @paths = paths
  @coordinator = coordinator
end

def remove(path)

def remove(path)
  @paths.delete(path)
  @coordinator.roots_list_change_notification
end

def to_h

def to_h
  {
    paths: to_request
  }
end

def to_request

def to_request
  @paths.map do |path|
    name = File.basename(path, ".*")
    {
      uri: "file://#{path}",
      name: name
    }
  end
end