Bernat Sampera
← Notes

What the fuck is a tool in AI engineering

AI Engineering

What the fuck is a tool in AI engineering

A tool is a function you hand to an LLM so it can do something concrete: call an API, query a database, run a calculation. The model decides when to invoke it, you wire up the execution, and the result goes back into the conversation.

That is the textbook answer. The more useful question is when you actually need one.

When a tool makes sense

Tools earn their keep in a very specialized agent, the kind where the same action gets applied hundreds of times. A support bot that issues refunds. A pipeline that looks up order status on every message. A scraper that hits the same endpoint in a loop. Narrow job, high repetition, one well-defined action repeated until it is boring. There, formalizing the action as a tool pays off: you write it once, harden it, and the model leans on it forever.

When it does not

For the majority of agents a company actually needs, a tool is the last thing that makes sense. Most internal work is not "do this one action 100 times." It is "understand how we work and reason across it." You do not want a hardcoded function for every question someone might ask.

The right solution there is context, not tools:

  • The API keys and credentials for the systems you already use.
  • A description of how the company actually works, its conventions, its vocabulary.
  • Which external dependencies you rely on and how they fit together.

Give the agent that, and it can figure out the action on the fly instead of waiting for you to predefine it. You stop building a function per task and start handing over the same map your engineers work from.

Tools are for the rare, repeated, specialized action. Context is for everything else, which is most of it.