What an MCP server actually contains
Three things, and it helps to keep them apart because they often get conflated.
Tools. Functions the model can call, each with a name, a description, a parameter schema and a return value. This is the part that matters.
Resources. Content the model can read without triggering an action: a document, a record, an extract from a reference table. Useful, rarely decisive.
Prompts. Pre-registered request templates the client can offer the user. Interface convenience, not architecture.
A server with nothing but well-described tools works. A server with all three but vague tools does not. That is where the outcome is decided.
The tool description is the real code
This is the point most teams discover too late. The model does not see your implementation: it sees a name, a sentence and a schema. If it picks the wrong tool, that is almost never its fault, it is that two descriptions look alike.
Three rules we apply systematically:
One business intent, one tool. Not one function per API endpoint. “Find a customer’s unpaid invoices” is a tool; “GET /invoices with nine optional parameters” is not, because it forces the model to guess the useful combination.
The description says when not to use it. A sentence like “do not use for credit notes, see this other tool” removes half the selection errors. It is counter-intuitive and very effective.
The schema refuses rather than guesses. A missing required parameter must produce an explicit error the model can read and correct, not a silent default that yields a wrong but plausible result.
The number of tools is a constraint, not a detail
Past twenty or thirty tools, selection degrades: each extra description dilutes the others. Two possible answers.
The first is to group: move up one level of abstraction so that ten tools cover what a hundred endpoints exposed. That is almost always the right answer, and it requires understanding the business.
The second is to select before calling: a first stage picks the few tools relevant to the question, and only those are presented to the model. That is what you need when the perimeter is genuinely wide, as on a full management suite.
Security: three decisions to take before the first line of code
The perimeter is closed by default. The server exposes only what you decided to open, tool by tool. A server that exposes “the database” is not an MCP server, it is a door.
Rights are the user’s, not the server’s. If the server queries everything with a privileged account, a user obtains through the agent what they cannot see in the software. That is an information leak with no technical flaw, and it is invisible in a demo.
Content injection is handled server-side. A document, a ticket or a free-text field can contain instructions the model takes as directions. No system prompt solves this reliably. What does: writes going through controlled functions, human approval on anything not reversible, and logging of every call with its parameters. The full reasoning is on MCP.
What a production server taught us
We operate MCP servers in front of clients’ business software, including one covering several dozen tools on a management suite. On the reporting agent at OOTI, a construction ERP, two measurements sum up everything above:
- 92 % tool-call precision, meaning the right function with the right parameters. That figure moved when we rewrote the descriptions, not when we changed model.
- Under $0.10 per interaction, because the agent calls two or three precise tools instead of loading a massive context.
The lesson is always the same: changing model takes a day, writing the tool contract takes the project. The SDK we use to build these servers is published as open source under the name rakam_systems.
When to build a server, and when to skip it
Skip it for a first project, on a single product, with a single agent. Calling your APIs directly is faster, and the tool descriptions will be reusable later anyway.
Build it as soon as there are several consumers: several models, a desktop client and a server-side agent, or several teams wanting to plug in their own assistants. From there you describe the tools once instead of once per integration, and that is what makes the cost reasonable.