A language model on its own knows only its training data and the text in the prompt. Tool calling gives it access to the application’s world: current data, calculations, actions in other systems. The model never acts itself — it proposes a call, and the application decides whether and how to execute it.
The flow
Alongside the request, the application passes the model a list of tools with name, description and a parameter schema. The model decides whether a tool helps and responds with a structured call, for example a customer search with certain criteria. The application checks the call, executes it and returns the result to the model, which formulates the answer or plans further calls. Several such loops make an AI agent.
Good tool descriptions
The model chooses tools based on their description. Unclear names, overlapping tools and vague parameters lead to wrong calls. What works: few, clearly delimited tools with descriptive names, precise descriptions of when to use a tool and when not, and tight parameter schemas with allowed values. Tools are an interface for a model and deserve the same care as an API for humans.
Validation and permissions
Every proposed call is validated server-side: schema, allowed values, the current user’s permission, tenant boundaries. The model must never be able to do more than the user on whose behalf it acts. Writing or consequential actions need confirmation, not least because prompt injection can trigger calls the user did not want. For repeatable actions, idempotency helps so that a duplicate call has no duplicate effect.
Error handling
Tools fail: timeouts, empty results, invalid parameters. Error messages should go back to the model in a form that lets it respond sensibly, for example with a question to the user instead of an invented answer. Limits on the number of loops prevent an agent from getting stuck and running up cost.
Standardisation
Connecting tools anew for each application is laborious. The Model Context Protocol standardises how applications provide tools and data to models, so a tool can be built once and used in several AI applications. For integration with existing systems, our API integration sprint is a good fit.
