It may be possible for me to modify the plugin to include a new action that queries for a value and then waits a set amount of time for a response which gets stored into LastResult. At the moment it is not possible and I can't say when I will get around to it, so it will be better if we can find a solution using the current plugin available.
Your Denon is responding with the information you want using an event when you query it for the volume, which is good. I was wondering if the Denon also generates that event whenever the mute status changes. In other words, after you have connected to it with the TCP client action, if you change the mute status on the Denon by some other means, such as a remote control, does it send an event without being asked? Probably not, but if it does it would make our lives a bit easier.
With the current event that you get back you need to have a command that responds to the event and stores the payload in a variable, or does some kind of logic based on the payload.
If I have done it properly, this command should display your response from the Denon.
<?xml version="1.0" encoding="utf-16"?>
<command id="355" name="denon mute event" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
<action>
<cmdType>OSD.ShowText</cmdType>
<cmdString>{1}</cmdString>
<cmdRepeat>1</cmdRepeat>
</action>
<event>DenonAVR1</event>
</command>
I may try to create a similar solution for my Onkyo, and then you can just modify the protocol a bit to make it work with yours.
I'm not too sure why you need a toggle action. Usually the problm people face is that they only have toggle and they need a way to perform discrete mute on/off.