Definition of the hornfels are a fine-grained metamorphic rock formed by the action of heat on clay rocks .