To declare a method add ti to a gmSL block:
<gmSL namespace="gmSL" class="gm"><[CDATA[[ void test(string arg1) { System.LogMessage("Here i am: " + arg1); } ]]></gmsl>
To run a method, invoke it with a RunCommand statement. For example:
<RunCommand id="gm.test" Prams="Mark" />