We investigate a method for quantifying the geometrical properties of large-scale structure in the galaxy distribution. We use a graph-theoretical construction known as the Minimal Spanning Tree(MST) to delineate the main features of the structure. We then extract quantitative measures of the shape of the MST known as structure functions. By using simple models,we show that these measures can quantify the tendency of clustering to occur preferentially in filaments, sheets or isolated clumps, and that they are relatively insensitive to the addition of an unclustered background of points and to the effects of redshift-space distortion. We then apply the method to a set of simulations of the ultra-large-scale structure traced by rich clusters of galaxies. These pose a difficult test for our method, because of the low sampling density of clusters. Nevertheless, the method does reveal significant differences between various models of clustering. We also compare our results for the structure functions with those obtained using a statistic proposed by Vishniac.