I would do it something like this, assuming I wanted to specifically control the grab locations...
- Use a player model that can be a ragdoll
- Place a small invisible entity at spots that can be grabbed.
- When the player jumps up, have their hands go upwards
- If the player's hands come within a certain trigger distance of an invisible grab spot, a "grab" occurs
To handle a grab...
- Let the player's body model keep moving on it's normal jump course
- Ragdoll move the hands to the grab location
- When the hands reach the grab location, lock them in place (they "grab")
- Let the body now become a ragdoll with the hands pinned to the grab spot
To handle a pull up from a ledge...
- Since the player's hands are pinned at the exact climb spot, you are all set for a "climb up" animation
- Play the "climb up" animation
I'm playing pretty loose here with the details of how one moves & controls the ragdoll I admit. The idea though is to get those hands pinned onto the grab spot and let the player hang there pinned by the hands to the grab spot.