An atomic force microscope was used to locally perturb and detect the charge density in carbon nanotubes. Changing the tip voltage varied the Fermi level in the nanotube. The local charge density increased abruptly whenever the Fermi level was swept through a van Hove singularity in the density of states, thereby coupling the cantilever's mechanical oscillations to the nanotube's local electronic properties. By using our technique to measure the local band gap of an intratube quantum-well structure, created by a nonuniform uniaxial strain, we have estimated the nanotube chiral angle. Our technique does not require attached electrodes or a specialized substrate, yielding a unique high-resolution spectroscopic tool that facilitates the comparison between local electronic structure of nanomaterials and further transport, optical, or sensing experiments