How to Limit the Tool Calls an AI Agent Can Make

The latest large language models are advertised as agentic, with persistent memory achieved through tool usage.

Working with AI models at the API level, I have noticed that some handle tool usage efficiently while others are very messy.

LLMs are designed to be helpful and, in my opinion, to burn tokens. When an LLM has unrestricted access to tools, it will query every possible source to give you what you are looking for.

Commercial chatbots, including those advertised as Enterprise, enable an endless number of tools to improve the user experience and make it seamless.

SAFi stands against the idea of all-you-can-eat tool access. It makes the process of adding tools deliberate and transparent enough that when one is added, everyone is aware of it.

By default, SAFi allows an agent five tool-calling rounds per request, and a single round can carry more than one call. If an agent reaches that limit before it has what it needs, SAFi stops the loop and makes it answer with what it gathered. This number can be increased or decreased at the agent level.

SAFi ships with a full MCP server, so every MCP tool is supported. However, only someone with operator access (access to the terminal) can add tools to the tool catalog to make them available for agents.

By limiting tool usage, SAFi lets you stay in control of your security and your costs.