To access the Metadata and Runtime Collections you would need to use a custom LogEventRequest which retrieves the data you require and then send it from within the Real-Time script. You can read more about how to do this here.