Again, don't miss the poetry here. It's not as though Jesus opens His mouth to smile and a big sword emerges. Rather, the sword symbolizes the Word He speaksfull of grace and truth (Joh 1:14).
Reminiscent of the blessing in Numbers 6, the allusion here is to graciousness and peace.