@hexa is correct. You will only be able to use variables that you receive in the function arguments (the bracket followed by a colon at the top of the file) or add them to the scope in another way – just like in most other programming languages.
Also note that gnome3.gnome-keyring is the correct name (the one with underscore is a legacy alias that will eventually be removed). Could you point us to where you found that so it can be corrected?