James 1:13-18 includes two great truths about God that serve as bookend to one reality about us.
Context
First the context.  James wrote to exhort believers to mature conduct by demonstrating their faith and wisdom through godly living (holiness) in spite of their sinful desires and the influence of the world (testing and sin). James 1:2-4 sets the stage for the whole book.
James 1:2-4 Count it all joy, my brothers, when you meet trials of various kinds, 3 for you know that the testing of your faith produces steadfastness. 4 And let steadfastness have its full effect, that you may be perfect and complete, lacking in nothing. (ESV)
He identifies the challenge–“testing of your faith.”
God’s goal–“that you may be perfect and complete, lacking in nothing.”
And our desired response–joy and steadfastness.
Notice that what James is dealing with is “the testing of your faith” that “various kinds” of trial or circumstances produce. Â He focus is not on the circumstances, the external forces, but the challenge to one’s faith.
Our faith is tested for strategic purpose–to make us perfect and complete, lacking nothing–as we remain steadfast.
The second part of the context is the first necessary response to the testing of our faith–the need for wisdom.
James 1:5—6 If any of you lacks wisdom, let him ask God, who gives generously to all without reproach, and it will be given him. 6 But let him ask in faith, with no doubting, for the one who doubts is like a wave of the sea that is driven and tossed by the wind. (ESV)
When our faith is tested and we are not sure how to respond, we are to ask God for wisdom.  Wisdom to respond in a way that we can remain steadfast so that God can make us perfect and complete, lacking nothing.
The Character of God
When we don’t respond correctly to the trials of our faith, we tend to shift the blame from ourselves to others and to God. Â (See Genesis 3, where Adam passes the blame to Eve and Eve to Satan.)
We may be tempted to ask, “Why is He doing this?” Â “Why is He causing this temptation?” Â “Why does He want me to fail?”
But notices James’ reminder of two great truths about God.
James 1:13 Let no one say when he is tempted, “I am being tempted by God,” for God cannot be tempted with evil, and he himself tempts no one. (ESV)
James 1:17—18 Every good gift and every perfect gift is from above, coming down from the Father of lights with whom there is no variation or shadow due to change. 18 Of his own will he brought us forth by the word of truth, that we should be a kind of firstfruits of his creatures. (ESV)
The first truth–There is nothing in God to which evil can appeal. Â There is no evil in God, no evil motives.
The second truth–In contrast to any evil, God is a giver, a giver of good gifts.
Rather than doing evil to us or seeking to cause us to stumble so He can judge or punish–He is the giver of good and perfect gifts.
Even the trials are for our good.
Even the trials of our character are for our good.
How? Why?
Because His desire for us is not comfort or happiness, but to make us complete, perfect and lacking nothing.
God’s goal for us is what is best for us.
Our Reality
So when we stumble, we cannot blame God–there is nothing in Him motivated by evil. Â When we stumble we must acknowledge that it is as a result of our own desires (the reality about us in this passage).
But we could argue, “He gave me the desires, it’s His fault.”
If He gave us the desires, than He can fulfill them the way He intended them to be fulfilled. Â We must trust Him and His motives–for they can only be pure, good and holy.
May we trust His character.