  We prove an $L^{p}$ estimate $$ \|e^{-itL} \varphi(L)f\|_{p}\lesssim
(1+|t|)^s\|f\|_p, \qquad t\in \mathbb{R}, \qquad
s=n\left|\frac{1}{2}-\frac{1}{p}\right| $$ for the Schr\"odinger group
generated by a semibounded, selfadjoint operator $L$ on a metric measure space
$\mathcal{X}$ of homogeneous type (where $n$ is the doubling dimension of
$\mathcal{X}$). The assumptions on $L$ are a mild $L^{p_{0}}\to L^{p_{0}'}$
smoothing estimate and a mild $L^{2}\to L^{2}$ off--diagonal estimate for the
corresponding heat kernel $e^{-tL}$. The estimate is uniform for $ \varphi$
varying in bounded sets of $\mathscr{S}(\mathbb{R})$, or more generally of a
suitable weighted Sobolev space. We also prove, under slightly stronger
assumptions on $L$, that the estimate extends to $$
  \|e^{-itL} \varphi(\theta L)f\|_{p}\lesssim (1+\theta^{-1}|t|)^s\|f\|_p,
  \qquad \theta>0, \quad t\in \mathbb{R}, $$ with uniformity also for $\theta$
varying in bounded subsets of $(0,+\infty)$. For nonnegative operators
uniformity holds for all $\theta>0$.
