We “boast” of our God, not of ourselves.
“For although a man may have many revelations, and have power to do many mighty works, yet if he boasts in his own strength, and sets at naught the counsels of God, and follows after the dictates of his own will and carnal desires, he must fall and incur the vengeance of a just God upon him” (D&C 3:4).
Ammon captured the spirit of Alma’s meaning in these words:
“Yea, I know that I am nothing; as to my strength I am weak; therefore I will not boast of myself, but I will boast of my God, for in his strength I can do all things; yea, behold, many mighty miracles we have wrought in this land, for which we will praise his name forever” (Alma 26:12).