Which of the following is grammatical?
- Is there a best school?
- Is there the best school?
I'm sure that the first one is right. But why?
The is the definite article. A is the indefinite article.
The question "Is there a best school?' is, by its nature, indefinite. Ergo, a.
It is necessary to determine the meaning of the question. Does it mean
- Does there exist a school that we would consider to be "the best"?
- Is the best school (which I know exists) in the particular location to which I am pointing?
Without more context, most native English speakers would interpret the question as in number 1. In that case, the declarative form of the sentences would be
There is a best school.
This is an adverbial use of there meaning
(3.) (usually there is/are) used to indicate the fact or existence of something: there comes a point where you give up
The sentence means that a best thing exists, but we are not indicating which particular school is best. The reference is indefinite as to which school merits the title, so the indefinite article a is used.
If the intended meaning is that described in number 2, the declarative sentence would be
There [pointing] is the best school.
In that case, there is used as an adverb meaning
(1.) in, at, or to that place or position: we went on to Paris and stayed there eleven days
If that was what was intended, a particular school is being identified, and the definite article the would be used. However, most English speakers would not use this construction.