After finally achieving peace from his enemies and firmly establishing his kingdom, King David experiences a profound internal conflict. He becomes acutely aware of a jarring disparity between his own honorable living conditions and the temporary dwelling of the Ark of the Covenant. Living in a permanent, roofed palace made of cedar wood built for him by Hiram [ביאור שטיינזלץ], a residence entirely fitting for his royal status [מצודת דוד], David looks upon the Ark of God, which merely rests inside a tent made of curtains [מצודת ציון, מצודת דוד].
The primary approach among commentators is that David is expressing deep sorrow over this contrast. He feels it is entirely inappropriate for a mortal king to reside in a magnificent palace while the holiest artifact rests in a temporary shelter, leading him to the logical conclusion that a permanent house must be built for it. Although he specifically mentions only the Ark, his intention encompasses the altar and the rest of the Tabernacle vessels that were located at the time in Gibeon. The Ark is singled out because it is the most important and revered of the vessels, and because David himself had pitched its current tent [רד"ק].
To initiate the construction of the Temple, David shares his thoughts with Nathan the prophet. His goal is to determine if God approves of this initiative and to have the prophet reveal the exact location where God chooses to rest His name [מלבי"ם]. David asks Nathan to look with a prophetic eye to see if this plan finds favor before God [מלבי"ם]. Furthermore, David humbly hints at the tranquility God has granted him, which allows for uninterrupted construction. He asks the prophet to observe on a spiritual level that the forces of evil have surrendered, and that his own soul has ascended to a high level, making the establishment of the Temple possible [חומת אנך].
Hearing this, Nathan immediately agrees and encourages David to follow his heart's desire [רלב"ג]. However, this initial approval is based entirely on Nathan's personal opinion rather than a divine revelation. Seeing that David is a righteous and worthy king, Nathan naturally assumes that God is with him and that David is indeed the one destined to build the future Temple. This interaction highlights a fundamental principle: a prophet does not inherently know hidden matters on his own. He only knows what is explicitly revealed to him through direct prophecy from God [רד"ק].