A valve for a well pipe, the valve having the following parts: a valve collar connectable to the well pipe; an index piston coaxially positioned within the valve collar for longitudinal translation within the valve collar between closed, flow-open, and locked-open configurations; a detent in the index piston, wherein the detent restricts fluid flow in a circulation direction through a flow path through the index piston; a spring that biases the index piston toward the closed and locked-open configurations; and a plug of the valve collar that mechanically communicates with the index piston to be in corresponding closed, flow-open, and locked-open configurations.