Tool registration can fail for multiple reasons: duplicate name, invalid name, permission policy is disabled etc. The imperative API handles this gracefully (usually by throwing NotAllowedError DOMExceptions, but how should we handle this for the declarative API? In a queued task, we should probably fire a toolerror event or some such, against either the offending <form> or the ModelContext object. I don't have strong opinions on which.
Or is there a better way to handle this?
Tool registration can fail for multiple reasons: duplicate name, invalid name, permission policy is disabled etc. The imperative API handles this gracefully (usually by throwing
NotAllowedErrorDOMExceptions, but how should we handle this for the declarative API? In a queued task, we should probably fire atoolerrorevent or some such, against either the offending<form>or theModelContextobject. I don't have strong opinions on which.Or is there a better way to handle this?