From time to time, I have heard people say that one of St. Thomas Aquinas's proofs for the existence of God is the ontological argument. Each time, I wonder where this person got that info because Aquinas, in some prominent places, makes it quite clear that he disagrees with the ontological argument ... and the ontological argument itself is based upon a way of thinking, a set of philosophical principles, that are antithetical to Aquinas's own philosophy and approach to life.
In light of that I thought I would gather some citations from Aquinas where he disagrees with versions of what is now called the ontological argument. After Anselm, the other big medieval thinkers who some say posit a form of the ontological argument are Bonaventure in his Commentary on I Sentences (d. 8, p. I, a. I, q.2) and in his De Mysterio Trinitatis (q. I, a. I) and Duns Scotus in his Ordinatio (I, 2, 1-2, nos. 137-139). I say “some” because with regard to Scotus others say his proof starts from what is experienced and therefore should not be categorized as “ontological” in the way that word is now understood.
The basic argument of Aquinas is that we cannot argue from a knowledge of essence of something, even God, to the conclusion that it exists. It exists only as a mental being, kind of like Kant's ens rationis.
The places where Aquinas argues against ontological-type proofs for God’s existence are:
Summa contra Gentiles, I, 11 (especially nos. 3-4). This chapter comes after having presented various forms of (“ontological”) arguments that are based upon the notion that once one understands what the name “God” means one will have to conclude God’s existence is self-evident, being a necessity of what the essence “God” contains. (cf. SCG, I, 10) It could be the case that because Aquinas presents his opponents’ arguments with great charity that some conclude they are his arguments. If one keeps reading his texts, however, it becomes apparent that he was just presenting an argument that some make because he then refutes them. Here is SCG, I, 11:
1. THE above opinion [ontological-type arguments that were stated in SCG, I, 10] arises partly from custom, men being accustomed from the beginning to hear and invoke the name of God. Custom, especially that which is from the beginning, takes the place of nature; hence notions wherewith the mind is imbued from childhood are held as firmly as if they were naturally known and self-evident.
2. Partly also it owes its origin to the neglect of a distinction between what is self-evident of itself absolutely and what is self-evident relatively to us. Absolutely indeed the existence of God is self-evident, since God's essence is His existence. But since we cannot mentally conceive God's essence, his existence is not self-evident relatively to us. …
3. Nor is the existence of God necessarily self-evident as soon as the meaning of the name 'God' is known. First, because it is not evident, even to all who admit the existence of God, that God is something greater than which nothing can be conceived, since many of the ancients said that this world was God. Then granting that universal usage understands by the name 'God' something greater than which nothing can be conceived, it will not follow that there exists in rerum natura something greater than which nothing can be conceived. For 'thing' and "notion implied in the name of the thing" must answer to one another. From the conception in the mind of what is declared by this name 'God' it does not follow that God exists otherwise than in the mind. Hence there will be no necessity either of that something, greater than which nothing can be conceived, existing otherwise than in the mind; and from this it does not follow that there is anything in rerum natura greater than which nothing can be conceived. And so the supposition of the nonexistence of God goes untouched. For the possibility of our thought outrunning the greatness of any given object, whether of the actual or of the ideal order, has nothing in it to vex the soul of any one except of him alone who already grants the existence in rerum natura of something than which nothing can be conceived greater.
St Thomas means: 'If I form a notion of a thing, and then get a name to express that notion, it does not follow that the thing, answering to such name and notion, exists.' St Anselm's disciples reply: 'True of the notions of all other things, as islands or dollars, which may or may not be; but not true of the notion of that one thing, whereof existence is a very part of the notion.' In other words, whereas St Thomas denies the lawfulness of the transition from the ideal to the actual order, they maintain that the transition is lawful in arguing the existence of that one Being, who is the actuality of all that is ideal. 'But is such actuality possible?' 'It is conceivable, therefore possible.' 'It may be conceivable, only because it is conceived inadequately, without insight into the inconsistencies which it involves.' 'You have no right to assume inconsistencies where you discern none,' rejoins Leibnitz. And so this 'ontological argument' will be tossed up and down, as an apple of discord, to the end.
4. Nor is it necessary for something greater than God to be conceivable, if His non-existence is conceivable. For the possibility of conceiving Him not to exist does not arise from the imperfection or uncertainty of His Being, since His Being is of itself most manifest, but from the infirmity of our understanding, which cannot discern Him as He is of Himself, but only by the effects which He produces; and so it is brought by reasoning to the knowledge of Him.
Objection 2. Further, those things are said to be self-evident which are known as soon as the terms are known, which the Philosopher (1 Poster. iii) says is true of the first principles of demonstration. Thus, when the nature of a whole and of a part is known, it is at once recognized that every whole is greater than its part. But as soon as the signification of the word "God" is understood, it is at once seen that God exists. For by this word is signified that thing than which nothing greater can be conceived. But that which exists actually and mentally is greater than that which exists only mentally. Therefore, since as soon as the word "God" is understood it exists mentally, it also follows that it exists actually. Therefore the proposition "God exists" is self-evident.
I answer that, A thing can be self-evident in either of two ways: on the one hand, self-evident in itself, though not to us; on the other, self-evident in itself, and to us. A proposition is self-evident because the predicate is included in the essence of the subject, as "Man is an animal," for animal is contained in the essence of man. If, therefore the essence of the predicate and subject be known to all, the proposition will be self-evident to all; as is clear with regard to the first principles of demonstration, the terms of which are common things that no one is ignorant of, such as being and non-being, whole and part, and such like. If, however, there are some to whom the essence of the predicate and subject is unknown, the proposition will be self-evident in itself, but not to those who do not know the meaning of the predicate and subject of the proposition. Therefore, it happens, as Boethius says (Hebdom., the title of which is: "Whether all that is, is good"), "that there are some mental concepts self-evident only to the learned, as that incorporeal substances are not in space." Therefore I say that this proposition, "God exists," of itself is self-evident, for the predicate is the same as the subject, because God is His own existence as will be hereafter shown (3, 4). Now because we do not know the essence of God, the proposition is not self-evident to us; but needs to be demonstrated by things that are more known to us, though less known in their nature--namely, by effects.
Reply to Objection 2. Perhaps not everyone who hears this word "God" understands it to signify something than which nothing greater can be thought, seeing that some have believed God to be a body. Yet, granted that everyone understands that by this word "God" is signified something than which nothing greater can be thought, nevertheless, it does not therefore follow that he understands that what the word signifies exists actually, but only that it exists mentally. Nor can it be argued that it actually exists, unless it be admitted that there actually exists something than which nothing greater can be thought; and this precisely is not admitted by those who hold that God does not exist.
I included the texts so you could see and verify for yourself that Aquinas disagrees with those who put forth any form of an ontological argument. Kant and Aquinas are not too far apart in their rejection of this type of argument for God's existence, however much they disagree with other arguments for the existence of God.