Let $X$ be a scheme with closed subscheme $Z$.
There is a natural way to think of $X$ as a functor from schemes to sets, $$X : S \mapsto X(S) = \mathrm{Mor}(S,X).$$
It seems there will be a similar way to understand the completion $\hat X$ of $X$ at $Z$ as a functor, but I am not sure how we do this. Please tell me if you know.