Variable inside brackets with terminal command, doesn't work

Why does this doesn’t work? or this is just how scripting in mikrotik work? assuming that EXAMPLE-INTERFACE do exist on the caps-man

:local a "interface=EXAMPLE-INTERFACE"
:log info [/caps-man registration-table print as-value where $a]

Its result is blank.