Hooks and internal variables

Any ideas how to use terraspace metadata in hooks?