I'll discuss the pumpkin seeds only. Pumpkin seeds, squash seeds, and such contain a substance that paralyzes tapeworms and roundworms to the point they can lose their grip on the intestinal walls and by flushed from the system. The pumpkin or squash pulp can actually loosen the bowels a bit, if you get my drift, and help flush them out.
This does not kill the worms. It does not remove all the worms from the chicken's system. It reduces the worm load so that the worms are not draining the chicken's energy as much. Chickens can normally handle a few worms OK. It is when the numbers get high that they cause a serious problem.