Seems like a cool feature for mods.
In the interest of engine compatibility, it would be good to see if this feature has already been implemented in other engines (most likely candidates are FTE or darkplaces) and if they have, to use the same builtin number and function signature.
If those engines do not have such a function, then you could find out what builtin numbers are not already used and pick one of those. This would help adoption of this feature by those other engines, by avoiding a conflict with other existing builtins.
The other thing that engines should do when adding new builtins is advertise their extensions using PF_checkextension. An example of that can be seen here: https://github.com/ezQuake/ezquake-source/blob/master/pr_cmds.c
(this last thing is a system that quakespasm doesn't have yet, because adding modding extensions hasn't been a focus.)