Feature request: SNMP pass-through to script

It would be nice when it is possible to pass-through an SNMP oid to a script that generates a value, then return that
value on the SNMP query.
This is a standard feature of “net snmp” often used on Linux:

#
#  "Pass-through" MIB extension command
#
#pass .1.3.6.1.4.1.8072.2.255  /bin/sh       PREFIX/local/passtest
#pass .1.3.6.1.4.1.8072.2.255  /usr/bin/perl PREFIX/local/passtest.pl

For example, I would like to retrieve the number of leases currently active. I found an experimental oid that lists
all the leases, but I encounter a bug when the number of leases is more than 256. And it would be more efficient
anyway when I could just retrieve it using a script and then only return the number.
This way, lots of things can be added to SNMP without having to ask for new SNMP oids that almost nobody is
going to use.