@IsAgentEnabled always returns 0

Before executing @Command([AgentEnableDisable]), I want to check whether the agent is currently enabled or disabled, but @IsAgentEnabled always returns 0 in a form action button running on an 8.5.1 Notes client.