I don’t think you can do what you want as things are not finalised yet.
I think the order is something like the below:
- Files are loaded in to picard.
- Picard retrieves metadata from the api.
- Plugins are called
- scripts are called
metadata has finished loading and all the metadata is ready to be applied.