A tool has a nitride hard material layer coated on tool substrate. The nitride hard material layer contains aluminum. The content of aluminum in the hard material layer at edge portion is increased, with respect to content of aluminum in hard material layer at distance of more than 500 mu m from the edge portion. An independent claim is included for preparation of tool.