The surface topography and local surface work function of ultrathin MgO(001) films on Ag(001) have been studied by noncontact atomic force microscopy (nc-AFM) and Kelvin probe force microscopy (KPFM). First principles calculations have been used to explain the contrast formation of nc-AFM images. In agreement with literature, thin MgO films grow in islands with a quasi rectangular shape. Contrary to alkali halide films supported on metal surfaces, where the island heights can be correctly measured, small MgO islands are either imaged as depressions or elevations depending on the electrostatic potential of the tip apex. Correct island heights therefore cannot be given without knowing the precise contrast formation discussed in this paper. KPFM shows a silver work function which is reduced by the MgO islands. The values for the work function differences for one and two layer thin films are -1.1 and -1.4 eV, respectively, in good agreement with recent calculations and experiments.