Functionalization of single-walled carbon nanotubes through cycloaddition reactions constitutes an effective route to obtain novel nanostructured materials with interesting properties. In this paper, we perform density functional theory calculations on Diels-Alder reactions at the sidewall of armchair, zigzag and chiral nanotubes by applying finite-length models of carbon nanotubes based on Clar's theory of the aromatic sextet. The analysis of binding energies and molecular orbitals suggests a prevalence of local factors, related to the structural and electronic properties at the coordinating site, in controlling the overall energetics of cycloaddition reactions. Our results can be expected to have strong implications in the development of rational strategies for the functionalization of carbon nanotubes of any stereochemistry.