The terms "poisonous" or "toxic" mean different things to different people. If it causes indigestion, could it be considered toxic? Probably yes, but many of us are inclined to include foods in our own diets that invariably cause indigestion. Is this a "lethal" tendency? Probably not.
Some plants are a danger to one animal species and not others and nearly ALL plants have some toxins under certain growing conditions. They may provide important animal food at other times. Often, conditions are those that are seriously stressful to the plant like drought, flooding, or over-fertilizing.
Cornell University Animal Science Department has information on plants specifically toxic to chickens and poultry.
The Merck Veterinary Manual only mentions poultry once but has a longer list and refers to "all grazing animals." Chickens may or may not be included in that group.
Regarding tomatoes and potatoes:
Here's info from Cornell on their toxins. Note they say, "Therefore, the concentration of these glycoalkaloids is highest in potato sprouts and green potato skins, and tomato vines and green tomatoes. Care should be taken to prevent the exposure of potatoes to sunlight. These alkaloids are
not destroyed by cooking or drying at high temperatures." (my emphasis)
The legume antinutrients can be effectively neutralized by cooking.
Steve