TITLE: Does the Grothendieck construction produce a 2-category or a category?
QUESTION [8 upvotes]: Let $F : \mathcal{C} \to \mathbf{Cat}$ be a lax 2-functor. Then we can form a category $\int F $ which is the Grothendieck construction on F.
There's a number of resources detailing this construction, but none mentioning if we can get a 2-category, rather than a category this way. It seems like the natural construction would be to generate a 2-category - is this true? I'm looking for a reference.
Namely - it seems like the 2-cells in $\mathcal{C}$ in standard definitions don't really play any role at all in $\int F$, but it seems like they should correspond to 2-cells in $\int F$.
The closest constructions I found were in (https://arxiv.org/abs/2002.06055, Definition 10.7.2.) . They provide a bicategorical Grothendieck construction for a functor $F : \mathcal{C}^{op} \to \mathbf{Bicat^{ps}}$ - but of a rather strange kind.
It does not use 2-cells in $\mathcal{C}$ and it also assumes certain equality of 1-cells in $\mathcal{C}$.
Another potential candidate is https://www2.irb.hr/korisnici/ibakovic/sgc.pdf, but it seems to be on a higher level of abstraction than I'm comfortable with.
It also seems to talk about the Grothendieck construction of functors whose codomain is $\mathbf{2-Cat}$, rather than into $\mathbf{Cat}$. It seems like this is extra structure that is not needed for what I'm asking.
So, in short, if there is a lax functor $F : \mathcal{C} \to \mathbf{Cat}$, is there a way to make the Grothendieck construction into a 2-category? If so - is there reference with an explicit construction, showing in details what all the 2-cells would look like?

REPLY [9 votes]: The usual Grothendieck construction has for $\mathcal C$ an ordinary category, so it doesn't have any 2-cells (or at least, doesn't have any non-identity 2-cells). Moreover, we actually get not only a category out of it, but an object of the slice (2-)category $\mathcal Cat/\mathcal C$. If $\mathcal C$ weren't an ordinary category, this wouldn't make as much sense since $\mathcal C$ wouldn't be an object of $\mathcal Cat$. (Just like how we can have functors $\mathcal C \to \mathcal Cat$, though, it's still possible to talk about functors from 1-categories to 2-categories).
Nonetheless, you can get a meaningful construction when adding in 2-cells. I have no idea if this construction has a name, but once you get the pattern, it's easy to extend this to any arbitrary level. For this construction, we'll assume we have a (lax) 2-functor $F : \mathcal C \to \mathcal Cat$.
0-cells of $\int F$ are pairs $(c, x)$ where $c$ is an object of $\mathcal C$ and $x$ is an object of $F(c)$.
1-cells $(c, x) \to (c', x')$ are pairs $(f, g)$ where $f : c \to c'$ and $g : x \to_f x'$. $x \to_f x'$ is the set of dependent morphisms from $x$ to $x'$ (terminology adapted from HoTT's dependent paths). Effectively, we use functorality in the types of $x$ and $x'$ to transport from one type to the other. In this case, the type of $x$ is $F(c)$ and the type of $x'$ is $F(c')$ so we can use $F(f)$ to map $x$ into the type of $x'$.
Summing up, $g$ should be a morphism $F(f)(x) \to x'$, i.e. an element of $\hom_{F(c')}(F(f)(x), x')$.
Next, our 2-cells $(f, g) \to (f', g')$ should be pairs $(\alpha, \beta)$ where $\alpha$ is a 2-cell $f \to f'$ in $\mathcal C$. $\beta$ should be a dependent morphism $g \to_\alpha g'$.
Now the types of $g$ and $g'$ are $\hom_{F(c')}(F(f)(x), x')$ and $\hom_{F(c')}(F(f')(x), x')$ respectively. This time, these type are contravariant in the variable we need to transport ($f$ and $f'$), so we'll transport $g'$ to $\hom_{F(c')}(F(f)(x), x')$ via $\hom_{F(c')}(F(\alpha)(x), x')$.
Unpacking this, $g'$ gets sent to $g' \circ F(\alpha)(x)$, so $\beta$ is a morphism $g' \circ F(\alpha)(x) \to g$. This time, though, we're talking about a morphism between morphisms in $F(c')$, which is an ordinary category. So rather than an actual morphism, we'll have an equality $g' \circ F(\alpha)(x) = g$.

REPLY [3 votes]: It produces a functor between categories. In fact, what is called a fibred category. The construction is detailed in Volume 2 of Borceux's Handbook on Categorical Algebra. 
Also Angelo Vistolis Notes on Grothendieck topologies, fibered categories and descent theory is worth looking at.