If you've ever invited someone you didn't yet know personally to connect on LinkedIn, then you have already violated LinkedIn's terms and conditions.
The truth is that most people you know have probably already violated LinkedIn's terms and conditions in same way or another.
You can read this User Agreement in the “Don’ts” section, which states:
g. [Don't] Invite people you do not know to join your network;
s. [Don't] Use LinkedIn invitations to send messages to people who don’t know you or who are unlikely to recognize you as a known contact;
Regarding carrying out these actions in an automated fashion, it is true that you are violating some more rules.
According to Linkedin’s User Agreement, you agree that you will not:
ae. Use bots or other automated methods to access the Services, add or download contacts, send or redirect messages;
k. Develop, support or use software, devices, scripts, robots, or any other means or processes (including crawlers, browser plugins and add-ons, or any other technology or manual work) to scrape the Services or otherwise copy profiles and other data from the Services;
So yes - if you use an automated tool to access the service - it is a breach of Linkedin’s User Agreement. That being said, LinkedIn itself sometimes offers you to connect with people you don't know - an act which, they themselves, warn against in their terms and conditions.
The follow-up concern to this topic is: "Will my account get blocked?" That's why in another article, we cover: What are the triggers which cause a LinkedIn account to get blocked, and how does Growth-X avoid them?
When we designed Growth-X, we kept in mind these terms and conditions to the best of our ability, and even today, we focus on helping our clients keep their campaigns targeted and relevant - thereby keeping your account safe (and efficient).