You could also try something like this:
cmk --list-tag [TAG1 TAG2…] List hosts having certain tags
In my case, all windows servers have been tagged as windows and linux servers as linux so, I can pull all like this
cmk --list-tag windows
cmk --list-tag linux