Except you are solving a known problem, after it happened.
It's much harder to solve problems before they are known.
It's much harder to build a robot that can solve unknown problems.
What might be useful though is a general purpose manipulator that can be controlled by humans on the ground.
Humans are useful because they have brains, eyes and general purpose hands, the combination of which can solve a huge number of problems.
Give the robot cameras, hands so that it can pick-up and use other tools or even non-tools (ie whatever is laying around the craft but wasn't explicitly designed as a tool) and a link to a human controller.