Understanding Foglight rule code

Hey all,

I wanted to understand better the code found in the rules.  For example, in the following code.  Where is object server defined?  How can I find all the properties and methods associated with the object?  This previous two questions would also apply to any object in the script below.  Also, the rule had a severity level rule defined by calling function retrieveLogRecordDetails('Fatal', #records#).  Where can I find information on this function?

I want to understand better how Foglight works.  Thanks in advance.

def records = #records#;

def alarms = server.AlarmService.getCurrentAlarms(scope.uniqueId)

def existingAlarm = alarms.find{it.ruleID == @foglight_rule_id && it.severity == 4};

if(existingAlarm){
return true;
}

return records.any{it.severity.name == "Fatal"};