You already can do that, even if it's not so nice, but you also have to differentiate between GW and MGMT. I can possibly imagine to add that information into gateways-and-servers API call, but the cpinfo data has to be already available on the mgmt server. For now you can do this:
mgmt_cli -r true run-script script-name "List Mgmt JHF" script "cpinfo -yMGMT 2>/dev/null | pcregrep -o1 -o2 '\s+HOTFIX_([^H]+)\w+\s+Take:\s+(\d+)'" targets.1 "management" --format json
mgmt_cli -r true run-script script-name "List Mgmt JHF" script "cpinfo -yFW1 2>/dev/null | pcregrep -o1 -o2 '\s+HOTFIX_([^H]+)\w+\s+Take:\s+(\d+)'" targets.1 "gateway" --format json
mgmt_cli -r true run-script script-name "List System JHF" script "cpinfo -yALL 2>/dev/null | pcregrep -o1 -o2 | sort -u'\s+HOTFIX_([^H]+)\w+\s+Take:\s+(\d+)'" targets.1 "chkp_system" --format json
https://sc1.checkpoint.com/documents/latest/APIs/#cli/run-script~v1.6%20
You can run against GW or MGMT or either system, and you will get back a result like:
R81_JUMBO_36
I hope that helps for now.