It is a method to expand the mind and liberate the dormant potential energy, and its principles form the basis of all yogic practices.
In the Nāth Tradition, legend ascribes the origin of tantra to Dattatreya, a semi-mythological yogi and the assumed author of the Jivanmukta Gita ("Song of the liberated soul").
Matsyendranath is credited with authorship of the Kaulajñāna-nirnāya, a voluminous ninth-century tantra dealing with a host of mystical and magical subjects.
The tantras are largely descriptions and specifications for the construction and maintenance of temple structures with their resident idols and lingas, for example is the Ajita Māhātantra.
[4][non-primary source needed] Another function was the conservation of esoteric texts for the exclusive use of rulers in rituals directed to deities controlling political affairs, for example the Śārada-tilaka Tantra.