[PLAT-3558] Ensure ToolContext is closed