Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:34:10

And We certainly gave David from Us bounty. ˹We said˺, "O mountains, repeat ˹Our˺ praises with him, and the birds ˹as well˺." And We made pliable for him iron,  

And verily We bestowed on David a ˹great˺ favour from Us — prophethood and scripture — and We said: ‘O mountains, repeat with him ˹in praise˺, by making glorifications, and the birds ˹too˺!’ (read wa’l-tayra in the accusative as a supplement to the ˹syntactical˺ locus of jibāl, ‘mountains’, in other words, and We also called on them to glorify ˹God˺ with him). And We made iron malleable for him, so that it was as dough in his hands.
القرآن:٣٤:١٠

وَلَقَدْ آتَيْنَا دَاوُودَ مِنَّا فَضْلًا ۖ يَا جِبَالُ أَوِّبِي مَعَهُ وَالطَّيْرَ ۖ وَأَلَنَّا لَهُ الْحَدِيدَ  

{ولقد آتينا داود منا فضلا} نبوة وكتابا وقلنا {يا جبال أوّبي} رجعي {معه} بالتسبيح {والطير} بالنصب عطفا على محل الجبال، أي ودعوناها تسبح معه {وألنا له الحديد} فكان في يده كالعجين.