TITLE: Pulling back a functor, it becomes monadic
QUESTION [8 upvotes]: $\require{AMScd}$I am in the following situation: the diagram
$$
\begin{CD}
\cal M @>r>> [{\cal B},Set] \\
@VuVV @VVf^*V \\
\cal D @>>N_g> [{\cal A}^\text{op},Set]
\end{CD}
$$
is a (strict) pullback in $\bf Cat$; moreover, $f : \cal A^\text{op}\to B$ is bijective on objects (and $f^*$ is the "inverse image" functor given by precomposition). In turn, $g$ is the "nerve" induced by a functor $g : \cal A \to D$. $N_g$ is fully faithful because $g$ happens to be dense, and so $r$ is f.f. as well. If needed, $\cal D$ is complete and cocomplete.
This gives $\cal M$ a very explicit description: it is a reflective subcategory of $[{\cal B},Set]$ made by the functors $F : {\cal B}\to Set$ such that $F(fA)={\cal D}(gA,D)$ for some $D\in\cal D$.

Is all this sufficient to imply that $u$ is monadic? If not, what additional assumptions are needed?

REPLY [10 votes]: If $A$ and $B$ are small and $D$ is locally presentable then $u$ is a monadic right adjoint. More generally, what is non-trivial is the construction of a left adjoint of $u$. As soon as $u$ has a left adjoint, $u$ is monadic.
The proof is relatively simple: the forgetful functor $f^*$ is monadic, so it satisfies all the conditions of Beck monadicity criterion, and all the conditions of the Beck criterion except the existence of an adjoint are automatically satisfied for its pullback ($f^*$ is an isofibration, so the square is both a strict and pseudo-pullback).
Now when all the category involved are locally presentable as both $f^*$ and $N_g$ are accessible right adjoint functors, the square is also a pullback in the category of locally presentable categories and accessible right adjoint functor (which is known to have all limits, and these limits are preserved by the forgetful functor to set by an old results, which appears in Bird's phd thesis, though I think it was known before)
For more details, you can also have a look to John Bourke and Richard Garner Monads and theories this is how they construct their functor from "pre-Theory to Monads" (which is left adjoint to the Kleisli category functor)