Everything I've ever read says the chemical is in all of the plant & it's fruit. Potatoes have it too.
My own experience was cleaning the garden out and letting them have at the excess of tomatoes and for weeks after i noticed way fewer eggs. It wasn't due to molt or fewer hrs of light. I...
Tomatoes aren't a good idea. It's a member of The nightshade family and those are poisonous to chickens. If they eat many tomatoes they will stop laying or have reduced laying.