A method for treating a heart valve of a patient includes inserting into a heart and in contact with a valve surface, an implant including an elongate element and a locking mechanism coupled to the elongate element. The locking mechanism has a resting position that provides a locked state preventing movement of the elongate element with respect to the locking mechanism. The heart valve is treated by facilitating movement of the elongate element with respect to the locking mechanism by maintaining application of a force to the locking mechanism using a tool, and thereby maintaining the locking mechanism in an unlocked state during the facilitating of the movement of the elongate element with respect to the locking mechanism. Subsequently, the locking mechanism is transitioned to the resting position by decoupling the tool from the locking mechanism.