Using a mixed approach: a semiempirical potential for the metal bonding within the cluster, and a potential fitted to ab initio calculations for the metal-oxide interaction, we have studied Pd clusters deposited on the MgO(100) surface. Focusing our attention on the experimentally observed pyramidal form of the Pd deposits, we have analyzed the evolution of their morphology and atomic structure as a function of cluster size. In agreement with the experimental results, we find the ``flattened'' pyramids with truncated edges being energetically the most stable. We also observe a systematic tetragonal deformation of Pd at the interface, consisting of a lateral dilation of the lattice parameter (matching the lattice parameter of the substrate), accompanied by a reduction of the vertical separation between the Pd layers. As the size of Pd cluster increases, the lattice mismatch is no longer perfectly accommodated by the dilation of the Pd deposit, and a series of subsequent structural transitions within the deposit release partially its strain, driving to relatively well localized small zones where Pd atoms do not coincide with the preferential adsorption site of Pd on the MgO(100) surface. They can be seen as dislocation precursors giving a clear superstructure pattern at the interface.