IK rigging with a hammer held in hand
A character using a hammer - (Blend file below - Vers 2.77, will work in 2.8+)
I'm assuming it's the IK 'using' the hammer or sword that you're having trouble with...
Getting the swing appearing natural is probably best achieved using a curve to guide the wrist or hand and the hammer parented to the hand bone so there'd be no slippage.  Other situations might be best served using the tool to drive the rigged arm and hand.

The setup in this example uses a vertical curve (arc) to guide the swing, but to avoid quirky behavior the left arm's handle (an Empty) is not forced to follow the curve directly.
Instead, a dummy plane follows the curve and that's what gets the curve modifier. (Called 'Curve Follower' in the file)
That dummy plane is made a parent for the arm's handle and this takes the arm down the curve but without glueing the arm to it.  The arm can still be moved about whilst it's following the curve
The hammer is made a child of the hand bone so there'll be no slippage.
The curve itself is given it's own handle so it also can be moved during the process. (the circle empty) This is a parent to both the curve and the curve follower.  It keeps the curve and follower together when the curve is moved forward and back during the swing.
The forward movement of the curve is to force the arm to extend a little and change the hand and hammer's angle.  The wrist wouldn't look too hot if it was twisted to do this.
With all that working properly the arm and hand will be seen to take the hammer down in an arc shaped swing.

On impact, because the backbone is in the process of bending forward and the wrist can't go anywhere, the elbow joint is forced to fold some more and change it's angle, automatically adjusting the hand and hammer's angle as well.  The curve is also moving back and that enhances the elbow's folding angle.
The hammer appears to kick up from the impact as though from a recoil.  This only last for a frame so the curve's follower is animated in the reverse direction to take the hammer and arm back up a little further.
Note that impact and rebound behavior is fashioned in the Graph editor.  Those keyframe handles are used to change the Bezier curves into linear style reactions so the hammer, hand, and arm, appear to bounce a little.  The impact approach and bounce is actually accelerated a little.