create a discovery rule with a host prototype that has template[s] with macros in it.
send a lld array to that rule so host[s] are generated with the assigned template[s].
Now try to finetune the tuneables.
The tuneables should be editable, otherwise the hostdiscoveries using host prototypes make no sense since we cannot tune tresholds on discovered hosts. As far as I know there is no workaround for this, other than creating templates for every host, making templates a bit dubious.
A similar situation exists for host group memberships.
Host generation by host prototypes is far easier than using the api's or web gui. Too bad that currently it is not usable. It would be nice to have the heavy lifting done and allow for some fine tuning like adjusting macro values and group membership.