We propose a geometric characterisation of the topological string partition functions associated to the local Calabi-Yau (CY) manifolds used in the geometric engineering of d=4, N=2 supersymmetric field theories of class S. A quantisation of these CY manifolds defines differential operators called quantum curves. The partition functions are extracted from the isomonodromic tau-functions associated to the quantum curves by expansions of generalised theta series type. It turns out that the partition functions are in one-to-one correspondence with preferred coordinates on the moduli spaces of quantum curves defined using the Exact WKB method. The coordinates defined in this way jump across certain loci in the moduli space. The changes of normalisation of the tau-functions associated to these jumps define a natural line bundle playing a key role in the geometric characterisation of the topological string partition functions proposed here.