The query syntax is interesting. A json schema defining an order of operations to perform server side. Looks kind of gnarly tbh.
At that point, seems simpler to just treat email data as a bunch of sql tables (i.e. lists, messages, threads, mailboxes, etc) and have the clients issue SQL statements to the server. Would be so much easier to create and read the requests and server implementers could lean on all the SQL tooling available.