The
calibredb command has sub commands to list custom columns and categories (tags)
Can't recall what properties they list, don't forget that custom columns and categories are stored for each library so you might need to use the --with-library option.
BR