Cyclodextrin flexibly capped with metal ion