pub fn upsert_tool(
dir: &Path,
id: &str,
tool: &ToolDecl,
) -> Result<bool, String>Expand description
Add tool to the manifest of plugin id in dir (replacing a tool with the same name),
with its settings and network permission, and write it. Returns whether it replaced one.