  We derive, adopting a direct method, the luminosity function and the
formation rate of long Gamma Ray Bursts through a complete, flux-limited,
sample of Swift bursts which has a high level of completeness in redshift z
(~82%). We parametrise the redshift evolution of the GRB luminosity as L =
L_0(1+ z)^k and we derive k = 2.5, consistently with recent estimates. The
de-evolved luminosity function of GRBs can be represented by a broken power law
with slopes a = -1.32 +- 0.21 and b = -1.84 +- 0.24 below and above,
respectively, a characteristic break luminosity L_0,b = 10^51.45+-0.15 erg/s.
Under the hypothesis of luminosity evolution we find that the GRB formation
rate increases with redshift up to z~2, where it peaks, and then decreases in
agreement with the shape of the cosmic star formation rate. We test the direct
method through numerical simulations and we show that if it is applied to
incomplete (both in redshift and/or flux) GRB samples it can misleadingly
result in an excess of the GRB formation rate at low redshifts.
