Disconnect the cable at the derailleur and move the cage by hand. If it moves inward freely when you let it go, the problem is in the housing. If it sticks or is reluctant to move even without the cable, it's the spring or pivots and the derailleur should be replaced.