$\DeclareMathOperator\GL{GL}\DeclareMathOperator\M{M}\DeclareMathOperator\Tr{Tr}$Consider the diagonal action of $\GL(n,\mathbb{C})$ on the variety of $k$-tuples of matrices, $\M_{n\times n}(\mathbb{C})^k$ through conjugation, then. Then it is known that the ring of invariants $\mathbb{C}[\M_{n\times n}(\mathbb{C})^k]^{\GL(n,\mathbb{C})}$ is generated by the functions obtained by first evaluating a non-commutative polynomial on the tuple of matrices and then applying the trace to the resulting matrix.
So for example if $k=2$, we need to look at functions like $(A,B) \mapsto \Tr(AB)$, $(A,B) \mapsto \Tr((AB)^2 A)$, etc.
Details Details can be found in :
Claudio Procesi - The invariant theory of $n \times n$ matricesThe invariant theory of $n \times n$ matrices., Claudio Procesi, Advances in Mathematics, Volume 19, Issue 3, March 1976, Pages 306-381
Now assuming this, suppose we are looking for the ring of invariants of tuples as before but now for the diagonal action of a reductive group $G$ on the variety of tuples $\mathfrak{g}^k$.
Then will it be true that the ring of invariants in this situation is also generated as above by first evaluating non-commutative polynomials and then taking the trace, but now we do this on the matrices obtained by considering various representations of $\mathfrak{g}$ (or $G$), just like what happens in the case of $k=1$?