In this paper, Jordan-Kronecker invariants are calculated for all nilpotent 6-and 7-dimensional Lie algebras. We consider the Poisson bracket family, depending on the lambda parameter on a Lie coalgebra, i.e., on the linear space dual to a Lie algebra. For some space g proposed in the paper, two skew-symmetric matrices are defined for all points x on this linear space. To understand the behaviour of the matrix pencil (A − λB)(x), we consider Jordan-Kronecker invariants for this pencil and how they change with x (the latter is done for 6-dimensional Lie algebras).