Unique pore selectivity for Cs+ and exceptionally high NH4+ exchange capacity of the chalcogenide material K6Sn[Zn4Sn4S17].