Expose tool.purpose too, and add missed definition for stages.