create metrics-tools with all of the index.json processing code as first content

cf. #20039 (moved) and #19934 (moved)

Any better ideas to resolve this issue?