Back port mdata-operator-script support to legacy scripts