  We study the metric-affine versions of scalar-tensor theories whose
connection enters the action only algebraically. We show that the connection
can be integrated out in this case, resulting in an equivalent metric theory.
Specifically, we consider the metric-affine generalisations of the subset of
the Horndeski theory whose action is linear in second derivatives of the scalar
field. We determine the connection and find that it can describe a
scalar-tensor Weyl geometry without a Riemannian frame. Still, as this
connection enters the action algebraically, the theory admits the dynamically
equivalent (pseudo)-Riemannian formulation in the form of an effective metric
theory with an extra K-essence term. This may have interesting phenomenological
applications.
