Detecting methanal molecule, an indoor air pollutant and potential carcinogen, is crucial for safeguarding human health, ensuring occupational safety, and maintaining environmental quality. In this study, density functional theory calculations have been performed to explore the adsorption behavior of formaldehyde (methanal) gas on the surface of two-dimensional semiconductor monolayers MS2 (M=W, Mo). Using the Computational DFT-based Nanoscope tool, we compute binding energies and determine configurations at global minimum energy of molecule adsorbed monolayer MS2. Five nonlocal van der Waals functionals; revPBE-vdW, optPBE-vdW, vdW-DF2, optB88-vdW, and optB86b-vdW are used to compute the adsorption energy profiles. The calculated results show that: (i) the optPBE-vdW functional products the largest adsorption energy magnitude, (ii) Methanal molecule exhibits physical adsorption on both MoS2 and WS2 materials (iii) Adsorption of methanal molecules may enhance the electrical conductivity of MoS2 and WS2 upon the electron donation to molecule by substrates. The adsorption energy magnitude, bandgap reduction, and charge transfer of the methanal-MoS2 adsorption system are respectively 1.04, 1.27, and 1.47 times larger than those of the methanal-WS2 adsorption system, while the diffusion barrier energy is 0.25 times smaller. These characteristic adsorption parameters imply that methanal exhibits higher sensitivity to the MoS2 substrate. This study also provides an in-depth discussion regarding the interaction between methanal and the MS2 substrate, focusing on aspects of relaxed geometrical structures, potential energy surface, adsorption energy, response length, recovery time, work function, charge transfer, density of states, and energy band structure.