A language model on its own only produces text. What turns it into a useful agent is tools: functions that let it check your inventory, create a quote, or open a ticket. Designing those tools well, and deciding how to expose them, is the engineering work that weighs most on the result.
Short answer: A tool for an AI agent is a function described to the model with a name, an explanation, and parameters; the model requests to run it and your system validates and executes it. MCP (Model Context Protocol) is an open protocol that standardizes how AI assistants connect to those tools and data sources.
What is a tool for an AI agent?
A tool is a function that you describe to the model with a name, an explanation, and the parameters it accepts. When the model decides it needs it, it responds with an execution request, for example "search_customer with tax ID X". Your code runs the function, returns the result, and the model continues. This is called function calling or tool use.
Key point: the model never executes anything by itself. It requests; your system validates and executes. That boundary is where you apply security.
What is MCP (Model Context Protocol)?
MCP is an open protocol (the acronym stands for Model Context Protocol) designed to standardize how AI applications connect to tools and data sources. Instead of coding a different integration for each combination of model and system, an MCP server exposes its capabilities in a standard way and any compatible client can use them.
An MCP server can offer:
- Tools: actions the model can request.
- Resources: data that can be read, such as documents or records.
- Prompt templates: reusable prompts for frequent tasks.
The practical advantage is reuse: if you build an MCP server for your ERP, you can connect it to different assistants and agents without rewriting it. Because the ecosystem evolves quickly, it is wise to check the current specification and versions before deciding.
Direct functions or MCP: when to use each?
| Situation | Recommended option |
|---|---|
| A single agent inside your own application | Direct functions in your backend |
| Several AI applications that need the same systems | MCP server |
| You want to use already published third-party tools | MCP client |
| Very strict security requirements and full control | Direct functions or a well-isolated internal MCP |
Using MCP is not mandatory. It is a standardization layer; if your case is simple, direct functions are easier to maintain.
How do you design good tools for an agent?
Few, clear, and with a purpose
Twenty similar tools confuse the model. Prefer a few tools with clear names: look_up_order, create_quote_draft, open_ticket.
Useful descriptions
The description is part of the prompt. Explain when to use it, what it returns, and what it does not do. Include examples of valid values for the parameters.
Strict parameters
Define types, formats, and lists of allowed values. Validate everything in your code; do not trust the model to send correct data.
Compact responses
Return only the necessary fields. A 200-field response consumes tokens and distracts the model. If something fails, return understandable error messages so the agent can correct and retry. Fewer fields also means less spending, as explained in LLM token costs.
Separation between read and write
Clearly mark which tools only query and which modify data. Write tools should be few, reversible whenever possible, and subject to approval in sensitive operations.
How do you secure an agent's tools?
- Least privilege. The agent uses a service account with limited permissions, not an administrator.
- Per-user permissions. If the agent acts on behalf of a person, it must inherit that person's permissions, not those of a superuser.
- Human approval for irreversible actions: issuing a CFDI (Mexico's electronic invoice), paying, deleting, sending bulk emails.
- Amount and frequency limits on each tool.
- Complete log of every call: who, which parameters, which result.
- Defense against prompt injection. Text that comes from an email, a page, or a PDF is data, not an order. A malicious document could try to get the agent to execute something improper; that is why permission control must live in your code and not in the prompt; also see AI security: prompt injection and data leakage.
- Third-party MCP servers. Treat them as external software: check who maintains them, what data they receive, and what permissions they request.
Example flow
A customer writes on WhatsApp: "Where is my order, and can I change the address?" The agent calls look_up_order, sees that it has not left the warehouse yet, calls update_address_draft, and asks the customer for confirmation. If the order had already shipped, the tool returns a clear error and the agent explains the situation and offers to hand over to a person.
Common mistakes
- Directly exposing your entire API to the model.
- Giving write tools without server-side validation.
- Ambiguous descriptions that lead the model to choose wrongly.
- Not testing what happens when a tool fails or is slow.
- Forgetting to version the tools; changing a parameter without notice breaks the agent.
- Relying on the prompt as a security mechanism.
When does it make sense to invest in a tools layer?
It makes sense to invest in a good tools layer when you plan several agents or assistants on the same systems, or when your ERP and CRM need to be opened to AI in a controlled way. If you only want to summarize texts, you need none of this.
At DaltoAura we design this tools layer, with MCP servers or direct functions depending on the case, with minimum permissions and audit logging from the start.
Frequently asked questions
Is it mandatory to use MCP to give tools to an agent?
No. MCP is a standardization layer that is useful when several AI applications need the same systems or you want to use third-party tools. If you have a single agent inside your own application, direct functions in your backend are usually simpler to build and maintain.
How many tools should an agent have?
As few as possible, with clear names and distinct purposes. Twenty similar tools confuse the model and increase selection errors. It is best to start with a few read-only ones, add reversible write tools later, and always keep those that query separate from those that modify data.
Which actions should an agent never execute without human approval?
Irreversible or high-impact ones: issuing a CFDI, executing a payment, deleting records, or sending bulk emails. Besides approval, each tool should have amount and frequency limits, and log who called it, with which parameters, and what result it got so it can be audited.
Are third-party MCP servers safe?
They must be treated like any external software. Check who maintains them, what data they receive, what permissions they request, and whether the code is auditable. Giving a third-party server broad access to your ERP or CRM without controls is equivalent to handing over administrator credentials, which is best avoided.
Let's talk
If you want an agent to use your ERP, CRM, or database without compromising security, tell us which systems you have and which actions you need, and we will design the tools layer.