Context : Recent studies carried out with SOHO and Hinode high-resolution spectrometers have shown that the plasma in the off-disk solar corona is close to isothermal . If confirmed , these findings may have significant consequences for theoretical models of coronal heating . However , these studies have been carried out with diagnostic techniques whose ability to reconstruct the plasma distribution with temperature has not been thoroughly tested . Aims : In this paper , we carry out tests on the Monte Carlo Markov Chain ( MCMC ) technique with the aim of determining : 1 ) its ability to retrieve isothermal plasmas from a set of spectral line intensities , with and without random noise ; 2 ) to what extent can it discriminate between an isothermal solution and a narrow multithermal distribution ; and 3 ) how well it can detect multiple isothermal components along the line of sight . We also test the effects of 4 ) atomic data uncertainties on the results , and 5 ) the number of ions whose lines are available for the DEM reconstruction . Methods : We first use the CHIANTI database to calculate synthetic spectra from different thermal distributions : single isothermal plasmas , multithermal plasmas made of multiple isothermal components , and multithermal plasmas with a Gaussian DEM distribution with variable width . We then apply the MCMC technique on each of these synthetic spectra , so that the ability of the MCMC technique at reconstructing the original thermal distribution can be evaluated . Next , we add a random noise to the synthetic spectra , and repeat the exercise , in order to determine the effects of random errors on the results . We also we repeat the exercise using a different set of atomic data from those used to calculate synthetic line intensities , to understand the robustness of the results against atomic physics uncertainties . The size of the temperature bin of the MCMC reconstruction is varied in all cases , in order to determine the optimal width . Results : We find that the MCMC technique is unable to retrieve isothermal plasmas to better than \Delta \log T \simeq 0.05 . Also , the DEM curves obtained using lines calculated with an isothermal plasma and with a Gaussian distribution with FWHM of \log T \simeq 0.05 are very similar . Two near-isothermal components can be resolved if their temperature separation is \Delta \log T = 0.2 or larger . Thus , DEM diagnostics has an intrinsic resolving power of \log T = 0.05 . Atomic data uncertainties may significantly affect both temperature and peak DEM values , but do not alter our conclusions . The availability of small sets of lines also does not worsen the performance of the MCMC technique , provided these lines are formed in a wide temperature range . Conclusions : Our analysis shows the present limitations in our ability to identify the presence of strictly isothermal plasmas in stellar and solar coronal spectra .