M2M JWT signing metadata

Using M2M to get a token, is there a way I can send metadata to be signed, on the fly? I understand the app has metadata, and that can be read/written to, but I’m looking to provide some data dynamically that can be trusted and referenced by my JWT consumers.

The Actions that run in this scenario have a function to add claims to the tokens.
api.accessToken.setCustomClaim(name, value)
You could populate it using event.client.metadata["your_metadata_attribute"]