Take a look at the cracked mortar I found during a recent Long Island Home Inspection. This mortar at the top is usually called the cap and it is the first line of defense when it comes to maintaining the integrity of the chimney. When these cracks in the cap go uncorrected moisture gets into the mortar and in the winter time freezes. When moisture freezes it expands and causes further damage. These process causes loose and missing bricks and can lead to moisture buildup in the flue and possibly as far down as the heating system.
This next picture of a chimney shows what a properly maintained chimney cap should look like. The chimney cap should not be level, it should have a slight pitch to allow water to properly run off. Also keep an eye out for damaged mortar between the bricks as this can also lead to the same issues with freezing. The above chimney is missing a rain cap which should be mounted on top of the flue. This rain cap prevents animals from entering the flue and possibly causing a clog. The rain cap also helps with keeping rain and snow from directly entering the flue. Below is an example of a chimney with a rain cap installed.