Using Deep Links to open a snap

You need to modify the .desktop file that snapd uses to generate the desktop entry. Primarily you need:

  1. A line registering the protocol. e.g:
MimeType=x-scheme-handler/my-protocol-name;
  1. Modify the exec= line to establish what arguments are acceptable, with valid argument types here.

So for example

[Desktop Entry]
Name=CarrollNotes
Comment=A meme notetaking application
Exec=CarrollNotes %u
Icon=${SNAP}/meta/gui/CarrollNotes.svg
Type=Application
Categories=Office;
MimeType=x-scheme-handler/CarrollNotes;

If this is done correctly, other applications will be able to call your protocol handler, and the arguments would be passed to your snap to handle. You could then hypothetically launch CarrollNotes://OpenNote?=foobar and the snap would be passed the argument and be free to respond to it.