Macrocyclic compounds can serve as hosts for smaller organic molecules, but precise control over the uptake and release of the guests remains challenging. Now, a host–guest system has been built that responds to the addition of metal ions, showing promise for drug-delivery applications.