Abstract rules for agreement

I’m investigating rule engines for different kinds of correction programs, i.e. grammar checkers. It is important to me to be able to write both general rules and specific ones. What is i.e. possible to achieve in Languagetool on this use case i German:

Incorrect: Er sagte, dass wir nicht in dem Auto lesen kannst.
Correct: Er sagte, dass wir nicht in dem Auto lesen kønnen.

To check agreement between nomen and finite verb, I would like to write a rule with an algoritm like: “verb number gender = nomen number gender; scope=current sentence”. A rule like this will catch basic agreement in German and might be restricted with more specific cases. Can this be done in Languagetool? Or put it another way: Is it possible to make agreement rules on the level of POS-tags only?

I am also looking for a complete overview of rule syntax and commands. Where do I find it?

Thanks for any feedback.

Yes, this could be detected with a Java rule. The question is more whether this works well on real sentences, i.e. whether it doesn’t create false alarms. Details about adding a Java rule can be found at Development Overview - LanguageTool Wiki.

The XML syntax is documented at Development Overview - LanguageTool Wiki, the Java API is documented at LanguageTool 6.4-SNAPSHOT API