For You, my God, have revealed to Your servant that You will build a house for him. Therefore Your servant has found the courage to pray before You.
We have here David's solemn address to God, in answer to the gracious message he had now received from him. By faith he receives the promises, embraces them, and is persuaded of them, as the patriarchs, Heb, Ch1 11:13. How humbly does he here abase himself, and acknowledge his own unworthiness! How highly does he advance the name of God and admire his condescending grace and favour!
Commenting on 1 Chronicles 17:16-27
For thou, O my God, hast told thy servant that thou wilt build him an house: therefore thy servant hath found [in his heart] to pray before thee. (r) You have declared to me by Nathan the prophet.
Hath found in his heart to pray - The Targum expresses a full sense: "Therefore thy servant hath found an opening of mouth, that he might pray before Thee.