Si vis pacem, para bellum
If you want peace for the swallows, make war on the magpies.
Swallows have a fair bit stacked against them, they can always do with our help, whereas the corvids will always prevail, no matter what we throw at them.
. . . and you only noticed the swallow chicks that they got, there will be countless more nests that they robbed, that you never saw.