  We aim at developing a robust methodology for constraining the luminosity and
stellar mass functions (LMFs) of galaxies by solely using data from
multi-filter surveys and testing the potential of these techniques for
determining the evolution of the miniJPAS LMFs up to $z\sim0.7$. Stellar mass
and $B$-band luminosity for each of the miniJPAS galaxies are constrained using
an updated version of the SED-fitting code MUFFIT, whose values are based on
composite stellar population models and the probability distribution functions
of the miniJPAS photometric redshifts. Galaxies are classified through the
stellar mass versus rest-frame colour diagram corrected for extinction.
Different stellar mass and luminosity completeness limits are set and
parametrised as a function of redshift, for setting limits in our flux-limited
sample ($r_\mathrm{SDSS}<22$). The miniJPAS LMFs are parametrised according to
Schechter-like functions via a novel maximum likelihood method accounting for
uncertainties, degeneracies, probabilities, completeness, and priors. Overall,
our results point to a smooth evolution with redshift ($0.05<z<0.7$) of the
miniJPAS LMFs in agreement with previous work. The LMF evolution of
star-forming galaxies mainly involve the bright and massive ends of these
functions, whereas the LMFs of quiescent galaxies also exhibit a non-negligible
evolution on their faint and less massive ends. The cosmic evolution of the
global $B$-band luminosity density decreases ~0.1 dex from $z=0.7$ to 0,
whereas for quiescent galaxies this quantity roughly remains constant. In
contrast, the stellar mass density increases ~0.3 dex at the same redshift
range, where such evolution is mainly driven by quiescent galaxies owing to an
overall increasing number of this kind of galaxies, which in turn includes the
majority and most massive galaxies (60-100% fraction of galaxies at
$\log_{10}(M_\star/M_\odot)>10.7$).
