Spun out from #101
If tool unregistration is purely using a string match, navigator.modelContext.unregisterTool('tool_name'), this can be an easy footgun. For example, if a site imports two third-party scripts and they both register webmcp tools, one script could easily unregister the other's tool by accident. (If the scripts are doing this on purpose... that's really a different problem altogether).
One idea from the above mentioned issue was to have registerTool return a teardown handle instead of using a global method. This naturally scopes the unregister capability to the component that registered it:
const unregister = navigator.modelContext.registerTool({ name: 'my_tool', ... });
unregister();