Grind everything under the "To grind: coconut masala" section to a super fine paste. Keep it aside until use
Now, Heat oil in a pan and crackle mustard seeds, cumin seeds and add chopped onions, curry leaves, garlic chopped and fry until brown.
Further add chopped tomatoes, salt, green chilli and fry on high heat for a minute.
Close and cook for about 10 minutes on medium heat.
Open, mix once and add prepared coconut masala, turmeric powder, chilli/sambar powder, water and mix well.
Close and cook again for about 10-15 minutes on medium heat.
Open and add chopped coriander leaves. Mix well and serve hot with idlis/dosas.