In the "Execute an AppleScript" action, click the "gear" icon, and select "Help".
About halfway down the Wiki page, there's a link that says "See Scripting for best methods". Click that.
You could have also found this by going to the Wiki, and searching for "AppleScript".
https://wiki.keyboardmaestro.com
The Wiki is your friend.