Ideally you need to find a Welsh dictionary with grammatical tags i.e tag words to indicate if they are nouns, adjectives, whether they are singular, plural, tag inflected words such as conjugations of verbs but also conjugation of preposition (which happens in Welsh).
Several years ago, I added Breton to LanguageTool. Breton and Welsh have similarities (e.g both have mutations, conjugated prepositions…). Both are in the same family of languages i.e. celtic → Insular celtic → Brittonic. For Breton, I found grammatical tags in the files of the Apertium French <-> Breton translator. For Welsh, I just did a quick Google search and I see a Welsh dictionary with grammatical tags at http://www.eurfa.org.uk/ which may be suitable as input of a script to import in LanguageTool
I did write a converter for An Gramadoir rules for LanguageTool, mainly for converting the Welsh language rules, but due to concerns with which dictionary should be used, I put this on hold whilst awaiting output from the CorCenCC project.
It would be awesome if this could be picked back up!