In high-density urban areas, pocket parks offer significant potential to mitigate thermal discomfort. However, the specific contributions of horizontal and vertical canopy structures to pocket parks’ cooling and thermal comfort effects remain unclear. This study addresses this gap by selecting 14 typical pocket parks in Shanghai and collecting high-resolution canopy and thermal data using unmanned aerial vehicles (UAVs). Generalized additive models were applied to assess the relationships between thermal conditions and spatial variables. The cooling effects were quantified by comparing the relative differences in surface temperature (Ts) and air temperature (Ta) between the pocket parks and non-vegetated reference sites, while thermal comfort was assessed using the Universal Thermal Climate Index (UTCI). The results revealed that: (1) On average, Ts was 3.98 °C lower, Ta was 1.18 °C lower, and UTCI was 3.74 °C lower in pocket parks than in non-vegetated sites. (2) A positive linear relationship was found between ΔUTCI and canopy coverage, indicating that increased canopy coverage enhances thermal comfort. (3) When considering three-dimensional (3D) metrics, mean foliage height was positively correlated with both ΔTa and ΔUTCI, while foliage height diversity had a negative impact. Notably, the ΔUTCI decreased when the 3D green volume exceeded 22 m3, suggesting that parks with tall, single-layer canopies composed of multiple small trees, each with a 3D green volume below 22 m3, optimize thermal benefits in summer. This study provides critical insights into the cooling and thermal comfort effects of pocket parks, offering practical guidance for park maintenance and redesign, particularly in the context of urban heat mitigation and adaptation strategies.