There is no apparent way to read the attributes of any existing materials into a material function for further use.
The FunctionInput node setting “Material Attributes” is an undocumented mystery (Material Functions Overview | Unreal Engine Documentation)