The pineal gland is a pea-sized organ inside the brain. It is called the epiphysis and is responsible for incorporating and discharging melatonin.
It is located in the mid-line of the brain and is attached to the roof of the third ventricle by a short stalk.
The chief function of the pineal organ is to get data about the condition of the light-dark cycle from the environment and convey this information to synthesize and secrete melatonin.
This chemical is exceptional as its discharge is being directed by light.