What is the meaning of the lines "if you can bear to hear the truth you've spoken . . . And stoop and build 'em up with worn-out tools"?
These lines speak to accepting what happens, and being willing to rebuild when things are torn down, in order to be a man.
When Rudyard Kipling says, "If you can bear to hear the truth you've spoken twisted by knaves to make a trap for fools," he means that sometimes, even when you speak the truth, others will change your words to hurt others or convince others of untrue things. He is saying that you have to be able to live with this: it is inevitable. You have to be able to overcome the negative feelings that might arise from this and move on with your life.
Kipling goes on to say, "Or watch the things you gave your life to, broken, and stoop and build ’em up with worn-out tools," which means that when things fall apart, a man fixes them. He doesn't simply mourn the damage that's been done: he is willing to look at his life's work after it is damaged, accept it, and then move to fix it.
Each of the lines in the poem describes someone who is a man, in Kipling's eyes: someone who is responsible and mature. It's not just about being male; it's about having the persona that comes with being a grown and mature man. When someone can fulfill all the qualities that Kipling has laid out—including the two quoted above—then they are able to claim that they're a man.
One of the major themes of this poem is that the superior person, anyone who is fit to be called a "man," is someone who will do their best at all times. They will work hard and never give up, even when they are surrounded by lesser people who do not appreciate their work and who may even destroy it. This is the meaning of the lines you cite.
Kipling is saying that you may do and say great things and other people may distort or destroy them. They might do these things either because they are fools or because they are bad people. Either way, the superior "man" just takes that in stride. The superior man sees his work or his words destroyed and just gets back to work.
So, these lines are saying that you never give up and you never allow other people to affect what you do. If you know you are doing right, you just keep doing it, even if other people are destroying your work and even if you are worn out and tired from your efforts.
The first line is "If you can bear to hear the truth you've spoken/Twisted by knaves to make a trap for fools . . ." As with all the conditionals in the poem, this is designed to be a test of manhood. So if you can handle the fact that speaking the truth will often get you into trouble—because people will distort your words for their own ends—then "you'll be a Man, my son!"
As indeed you will be if you can "watch the things you gave your life to, broken/And stoop and build 'em up with worn-out tools . . ." This is undoubtedly an allusion to what Kipling sees as the thankless task of colonialism, which involves building an entire civilization from scratch but which can all too easily be destroyed by the ungrateful natives. And when that happens, the colonialist must show himself to be a man by building the whole thing up again using the "worn-out tools" or limited means at his disposal.