the `snapd-control’ interface is massively powerful and effectively makes your snap own the machine (i.e. allows to circumvent all confinement) …
for security reasons you might be better off to use a system-files interface to gain read access to /var/lib/snapd/state.json and parse it …