Assume we have $K$ and $L$ (comm.) rings, and we have a functor $F$ from the category of $K$-Algebras to the category of $L$-Algebras (I work only with commutative rings). What conditions need to satisfy this functor in order to "extend" to a functor $F^*$ form the category of $\operatorname{Spec}(L)$-Schemes to the category of $\operatorname{Spec}(K)$-Schemes?
It is clear that the extension, if it exists, is unique, by Yoneda's lemma.
On the other hand, I am not sure any functor will work; it seems to me we need that the functor sends "open affine immersions" to "open affine immersions", i.e. flat morphisms $g:R\to S$ of finite presentation which are epimorphism, to the same type of morphisms, in order to be able to "patch" the image of an affine covering of a $\operatorname{Spec}(L)$-scheme to get a $\operatorname{Spec}(K)$-scheme. But I don't see how to do it if the intersections are not affine, and one needs to get an affine covering of the intersections, and so on. Moreover, I don't know if it is sufficient to show this for principal open schemes, so for maps of the type $g:R\to R[1/a]$ for $a\in R$.
I am interested, for example, in the functor sending any ring $R$ to its total ring of fractions $Q(R)$. I have not seen this mentioned in the scheme world. But such a general result, if it exists in the literature, could be useful to get e.g. the base change functor, or the reduced subcheme functor, etc.