1. Changes in vegetation community composition, such as a transition from grassland to shrubland (woody encroachment), are associated with reductions in plant cover and increases in bare ground. Encroachment‐driven changes in surface cover at small spatial scales can alter ant community assemblages by changing their foraging behaviour and their ability to locate and monopolise resources. 2. Artificial arenas with three levels of complexity were used to examine changes in ant foraging efficiency, body size and ability to monopolise food. The three levels of complexity included a control (no substrate), low‐complexity treatment (woody debris) and high‐complexity treatment (leaf litter). 3. No difference was found in ant species composition within the complexity arenas between grassland and shrubland, but ant functional groups ‘generalised Myrmicinae’ and ‘subordinate Camponotini’ were more abundant in grassland arenas, whereas ‘opportunists’ were more abundant in shrubland arenas. Ants took twice as long to find baits in high‐complexity treatments, and 1.5 times as long in low‐complexity treatments, than in control treatments, which were bare arenas with no substrate. Ant body size declined with increasing surface complexity, suggesting that larger ants are discouraged from foraging in complex habitats. 4. There was also significantly greater monopolisation of the protein bait (tuna) in low‐ and high‐complexity treatments, but there were no differences between tuna and carbohydrate (honey) in the control treatment. Consistently, no differences were found in ant behaviour between grasslands and shrublands. 5. The present study shows that ants are more responsive to small‐scale alterations in soil surface complexity than to changes in vegetation community composition. Changes in soil surface complexity select for ants based on body size, which in turn influences their foraging success. Changes in vegetation complexity at small spatial scales are therefore likely to influence ant behaviour and abundance of some functional groups, potentially having an effect on the many ecosystem functions carried out by ants.