A simple tool, like a hammer, is not volatile over time. The house that you build with your tools is. It will weaken and rot, and given enough time it will crumble. It takes care and maintenance to keep it safe to live in.
It is the same with code in production; at some point in time in the future, through no fault of your own, the code can become "wrong" as reality changes around it.
Code is also costly to maintain, sometimes even for small code bases. As the world changes, so must the code.
One of the definitions of "liability" in the Merriam-Webster dictionary  is "a feature of someone or something that creates difficulty for achieving success". This definition is often met by code.
 - https://www.merriam-webster.com/thesaurus/liability
A simple tool like a hammer is rarely treated like an asset as it is expensed up front.
Code can generate cash flow through its replication and exchange, or its application. Whether this is higher than its depreciation and maintenance costs determines whether you’re losing money on it.
The above is an analogy of course, In actual financial accounting we typically see only see code or “knowledge capital” on the books after acquiring another company, usually as a fat chunk of “goodwill”.
You could almost call it "something (such as an instrument or apparatus) used in performing an operation."
Definition 1C in the link you provided lists "a means to an end" as a definition of a tool, which I explicitly mentioned code was.
So I must concur, code is a tool. But I'm adamant that it is also a liability.