Section 6. He shall consult with and advise district attorneys in matters relating to their duties; and, if in his judgment the public interest so requires, he shall assist them by attending the grand jury in the examination of a case in which the accused is charged with a capital crime, and appear for the commonwealth in the trial of indictments for capital crimes.
He shall also consult with and advise district attorneys in all civil actions brought pursuant to chapter two hundred and fifty-eight, and may assist them in the defense of such actions.