While three-dimensional measurement technology is spreading fast, its meaningful application to sedimentary geology still lacks content. Classical shape descriptors (such as axis ratios, circularity of projection) were not inherently three-dimensional, because no such technology existed. Recently a new class of three-dimensional descriptors, collectively referred to as mechanical descriptors has been introduced and applied for a broad range of sedimentary particles. First order mechanical descriptors (registered for each pebble as a pair {S, U } of integers), refer to the respective numbers of stable and unstable static equilibria and can be reliably detected by hand experiments. However, they have limited ability of distinction as the majority of coastal pebbles fall into primary class {S, U } = {2, 2}. Higher order mechanical descriptors offer a more refined distinction. However for the extraction of these descriptors (registered as graphs for each pebble) hand measurements are not an option and even computer-based extraction from 3D scans offers a formidable challenge. Here we not only describe and implement an algorithm to perform this task, but also apply it to a collection of 271 pebbles with various lithologies, illustrating that the application of higher order descriptors is a viable option for geomorphologists. We also show that the so-far uncharted connection between the two known secondary descriptors, the so-called Morse-Smale graph and the Reeb-graph can be established via a third order descriptor which we call the master graph.