The metascripts can do that. The easiest way to see it is to start with a command line, so let's just posit one...
Given a to hit roll of 1d20
And a damage roll of 2d8
...where a selected character was attacking a targeted token and...
...the value the to-hit roll needed to beat was the AC attribute on the targeted token's character sheet...
...then...
...an imaginary starting command line for an attack might be:
&{template:default} {{name=@{selected|token_name} Attacks!}} {{To Hit=[[1d20]] }} {{Tarrget AC=@{target|AC} }} {{Damage=[[2d8]] }}
To use this and expand it into what you want, we're going to need another command. The above command is the attack, which hits the chat output. In addition to this, we need to potentially send a message to the GM if the attack misses. We'll need to use the to-hit roll to determine whether to send the message, which means we're going to need it in 2 messages. We can do that in a ZeroFrame batch set of commands:
!{{(^)
{^&template:default} ({)name=@{selected|token_name} Attacks!(}) ({)To Hit=[[1d20]] (}) ({)Tarrget AC=@{target|AC} (}) ({)Damage=[[2d8]] (})
{&if $[[0]] > @{target|AC} }
/w gm {^&template:default} ({)name=Near Miss!(}) ({)Missed By=[\[\ @{target|AC} - $[[0]] \]\] (}) ({)Result=get.TableMule.NearMiss.$[[3]].value/get (})
{&end}
}}
The above assumes you've setup a character named "TableMule" and on that character you've created an ability named "NearMiss". That ability should be structured with the range of your miss values and the result you want to report:
<=10=Miss
11-12=Bounces off armor
13-15=Localized gravity event pulls shot off-course
16-18=An animatronic carp stops the shot
19=A grazing shot
>20=Projectile lodged in armor
I can explain the various parts of what's going on, there, and I will if you decide to try this version out.
EDIT: Corrected ":" that was in the first template command, above, replacing it with an "=" as discussed below.