One way is to convert rotation vector to rpy, then set x to 3.14 and y to 0, convert back to rotation vector and assign to pose.
Try rotvec2rpy() and rpy2rotvec() script functions.
Thank you for the answer but I just realize that I made a mistake in my explanation…
From the begining I was meaning the tcp frame and not the tool frame.
modified the post