Let $L=L(\phi,g)$ be a local field Lagrangian in the space-time $(M,g)$, and $$S_K[\phi,g]=\int_K L(\phi,g)\sqrt{|\det g|}\mathrm{d}x\ ,\quad K\subset M\text{ any bounded region}$$ the corresponding (family of) action functional(s indexed by $K$ as above). We allow $L$ to have finite but otherwise arbitrary order dependence on $\phi$ and $g$, and no explicit space-time dependence since we want it not to depend on any other fields. The infinitesimal variation of $S_K$ with respect to a vector field $X$ on $M$ (i.e. an infinitesimal diffeomorphism) is then given by $$\delta_X S_K[\phi,g]=\int_K\left(\frac{\delta L(\phi,g)}{\delta g_{\mu\nu}}\delta_X g_{\mu\nu}+\frac{\delta L(\phi,g)}{\delta \phi^j}\delta_X \phi^j+\nabla_\mu(T^{\mu\nu}X_\nu)\right)\sqrt{|\det g|}\mathrm{d}x\ ,\quad X_\rho=g_{\rho\sigma}X^\sigma\ ,$$ where $\frac{\delta L(\phi,g)}{\delta g_{\mu\nu}}$ and $\frac{\delta L(\phi,g)}{\delta \phi^j}$ are respectively the Euler-Lagrange (i.e. variational) derivatives of $L(\phi,g)$ with respect to $g$ and $\phi$, $\nabla$ is the Levi-Civita covariant derivative associated to $g$, $T^{\mu\nu}$ is the (canonical or improved) stress-energy tensor, $$\delta_X g_{\mu\nu}=\nabla_\mu X_\nu+\nabla_\nu X_\mu$$ is the Lie derivative of $g$ along $X$ and the infinitesimal field variation $\delta_X\phi^j$ depends on the particular way we lift $X$ to a projectable vector field on the total space of the fiber bundle over $M$ where the fields $\phi^j$ live (for instance, if they are all scalar fields, we simply have $\delta_X\phi^j=-X\phi^j=-X^\mu\nabla_\mu\phi^j$).
There is an implicit but crucial requirement on the admissible improvements for $T^{\mu\nu}$ - namely, the improved Noether current $j^\mu(L,X)=T^{\mu\nu}X_\nu$ associated with the would-be symmetry $X$ of the action functional should not only be linear in $X$ but depend only on the point values of $X$ (we call this property ultralocality) - therefore, we wrote it already as a tensor contraction. This requirement also affects to a certain extent the definition of the infinitesimal field variation $\delta_X\phi^j$, but the details of this are not important in what follows. Why do we insist on this requirement? As we shall see below, ultralocality singles out a unique improvement prescription for $T^{\mu\nu}$ which in addition satisfies all physical desiderata. This idea applies more generally to any local symmetry - for instance, it may be used to improve the canonical Noether current associated with local gauge symmetries.