The gristle_validator should be able to use the metadata database as a json schema input. The process could be to generate a yaml/json file from the metadata.