Add getMinTagId functionality