Proverbs 24:8

He that deviseth to do evil shall be called a mischievous person.

Devising evil brings the name of a mischievous person even when the devised harm is never performed. Thought itself therefore carries moral weight apart from outward action. A pure heart is one cleared of such evil planning and kept free from it.