Worldwide declines in shorebird populations, driven largely by habitat loss and degradation, motivate environmental managers to preserve and restore the critical coastal habitats on which these birds depend. Effective habitat management requires an understanding of the factors that determine habitat use and value to shorebirds, extending from individuals to the entire community. While investigating the factors that influenced shorebird foraging distributions among neighboring intertidal sand flats, we built upon species-level understandings of individual-based, small-scale foraging decisions to develop more comprehensive guild- and community-level insights. We found that densities and community composition of foraging shorebirds varied substantially among elevations within some tidal flats and among five flats despite their proximity (all located within a 400-m stretch of natural, unmodified inlet shoreline). Non-dimensional multivariate analyses revealed that the changing composition of the shorebird community among flats and tidal elevations correlated significantly (ρs = 0.56) with the spatial structure of the benthic invertebrate prey community. Sediment grain-sizes affected shorebird community spatial patterns indirectly by influencing benthic macroinvertebrate community compositions. Furthermore, combining sediment and macroinvertebrate information produced a 27% increase in correlation (ρs = 0.71) with shorebird assemblage patterns over the correlation of the bird community with the macroinvertebrate community alone. Beyond its indirect effects acting through prey distributions, granulometry of the flats influenced shorebird foraging directly by modifying prey availability. Our study highlights the importance of habitat heterogeneity, showing that no single patch type was ideal for the entire shorebird community. Generally, shorebird density and diversity were greatest at lower elevations on flats when they became exposed; these areas are at risk from human intervention by inlet sand mining, construction of groins and jetties that divert sediments from flats, and installation of seawalls on inlet shorelines that induce erosion of flats.