You were correct to suggest that there is an emit signal, however the identifier is not declared in the current scope?
However, with the command_submitted I think this would have to be a function by itself. For example:
func addcommand(name, target, targetname = null):
emitsignal("commandadded", name, target, targetname)
return self.commandservice.create(name, target, targetname)
Also, with picking up an item, it would be as simple as making the banana disappear when a specific command is imputed, and from their a signal to the node to queue_free().
I'm not really sure, trying to make heads and tails out of this.