One embodiment provides an implantable biomedical probe. The probe includes a substrate and one or more metallic coils positioned above the substrate. A respective metallic coil is configured to generate an electromagnetic field in response to an alternating current flowing through the metallic coil. The probe further includes a smart polymer layer positioned above the metallic coils. The smart polymer layer includes at least one photo-switching magnetic material that changes magnetic susceptibility in response to optical stimuli.