Anions play a crucial role in locking alkali metals on the interior of metal-organic capsules that contain structural water gates. This role is further evidenced when stitching-up the capsule seam, resulting in either expulsion or trapping of cesium ions depending on the anion employed.