Muster custom actions can be spawned by the Dispatcher or the Render clients, depending if they are jobs based or chunk based.

In both scenarios, you can pass arguments to an action using the template %ATTR substitution syntax. I.e. if you want to pass a job ID to a custom action you could write something like:

C:\MYCUSTOMACTION.EXE %ATTR(job_id)

Alternatively, Muster exports a custom environment within each action, with the following keys available:

MUSTER_SUBMISSION_TIME
MUSTER_PACKET_TYPE
MUSTER_ENGINE
MUSTER_PRIORITY
MUSTER_INSTANCES_WORKING
MUSTER_MAX_INSTANCES
MUSTER_IS_PAUSED
MUSTER_END_TIME
MUSTER_START_TIME
MUSTER_STATUS
MUSTER_PROGRESS
MUSTER_SUBMITTER
MUSTER_NAME
MUSTER_JOB_GROUP
MUSTER_JOB_DEPARTMENT
MUSTER_JOB_ID
MUSTER_PACKET_SIZE
MUSTER_POOL
MUSTER_EXCLUDED_POOL
MUSTER_EXITCODES_ERROR_CHECK_TYPE
MUSTER_LOGS_ERROR_CHECK_TYPE
MUSTER_PARENT_ID
MUSTER_JOB_TYPE
MUSTER_DEPEND_ID
MUSTER_DEPEND_MODE
MUSTER_REQUEUED
MUSTER_IS_LOCKED

You can query those values, directly inside your action code, using getenv or whatever command your script/language supports.