In Pullum and Huddleston’s CGEL grammar, a clause is first a matter of syntax, second a matter of semantics. That is, it is a particular form that is observed in words and sentences, but which may have multiple functions - a declarative-type clause can actually function as a question, for example. So there’s a separation between form and function. Clauses are primarily form, and secondarily have a variety of particular functions.
They call the semantic function of a clause its illocutionary force, and stress that there is no simple correspondence between a clause type and one single illocutionary force, instead, each clause type is multi-functional (and probably somewhat irregular).
They have an entire chapter devoted to this topic, here.