Intro
functions powered by Giant Language Fashions (LLMs) require integration with exterior providers, for instance integration with Google Calendar to arrange conferences or integration with PostgreSQL to get entry to some knowledge.
Perform calling
Initially these sorts of integrations had been carried out by perform calling: we had been constructing some particular capabilities that may be known as by an LLM by some particular tokens (LLM was producing some particular tokens to name the perform, following patterns we outlined), parsing and execution. To make it work we had been implementing authorization and API calling strategies for every of the instruments. Importantly, we needed to handle all of the directions for these instruments to be known as and construct inner logic of those capabilities together with default or user-specific parameters. However the hype round “AI” required quick, generally brute-force options to maintain the tempo, that’s the place MCPs had been launched by the Anthropic firm.
MCPs
MCP stands for Mannequin Context Protocol and at the moment it’s a normal means of offering instruments to the vast majority of the agentic pipelines. MCPs mainly handle each integration capabilities and LLM directions to make use of instruments. At this level some might argue that Expertise and Code execution that had been additionally launched by the Anthropic these days have killed MCPs, however the truth is these options additionally have a tendency to make use of MCPs for integration and instruction administration (Code execution with MCP — Anthropic). Expertise and Code execution are centered on the context administration downside and instruments orchestration, that may be a completely different downside from what MCPs are focused on.
MCPs present an ordinary strategy to combine completely different providers (instruments) with LLMs and likewise present directions LLMs use to name the instruments. Nevertheless, listed below are a few issues:
- Present mannequin context protocol supposes all of the device calling parameters to be uncovered to the LLM, and all their values are alleged to be generated by the LLM. For instance, meaning the LLM has to generate consumer id worth if perform calling requires it. That’s an overhead as a result of the system, software is aware of consumer id worth with out the necessity for LLM to generate it, furthermore to make LLM knowledgeable in regards to the consumer id worth we’ve to place it to the immediate (there’s a “hiding arguments” strategy in FastMCP from gofastmcp that’s centered particularly on this downside, however I haven’t seen it within the unique MCP implementation from Anthropic).
- No out-of-the-box management over directions. MCPs present description for every device and outline for every argument of a device so these values are simply used blindly within the agentic pipelines as an LLM API calling parameters. And the outline are offered by the every separate MCP server developer.
System immediate and instruments
When you find yourself calling LLMs you normally present instruments to the LLM name as an API name parameter. The worth of this parameter is retrieved from the MCP’s list_tools perform that returns JSON schema for the instruments it has.
On the identical time this “instruments” parameter is used to place further info to the mannequin’s system immediate. For instance, the Qwen3-VL mannequin has chat_template that manages instruments insertion to the system immediate the next means:
“...You're supplied with perform signatures inside <instruments></instruments> XML tags:n<instruments>" }}n {%- for device in instruments %}n {{- "n" }}n { tojson }n {%- endfor %}...”
So the instruments descriptions find yourself within the system immediate of the LLM you’re calling.
The primary downside is definitely partially solved by the talked about “hiding arguments” strategy from the FastMCP, however nonetheless I noticed some options the place values like “consumer id” had been pushed to the mannequin’s system immediate to make use of it within the device calling — it’s simply quicker and far easier to implement from the engineering standpoint (really no engineering required to only put it to the system immediate and depend on a LLM to make use of it). So right here I’m centered on the second downside.
On the identical time I’m leaving apart the issues associated to tons of garbage MCPs available on the market — a few of them don’t work, some have generated instruments description that may be complicated to the mannequin. The issue I focus right here on — non-standardised instruments and their parameter descriptions that may be the rationale why LLMs misbehave with some instruments.
As a substitute of the conclusion for the introduction half:
In case your agentic LLM-powered pipeline fails with the instruments you might have, you may:
- Simply select a extra highly effective, trendy and costly LLM API;
- Revisit your instruments and the directions general.
Each can work. Make your resolution or ask your AI-assistant to decide for you…
Formal a part of the work — analysis
1. Examples of various descriptions
Primarily based on the search by the true MCPs available on the market, checking their instruments lists and the descriptions, I may discover many examples of the talked about situation. Right here I’m offering only a single instance from two completely different MCPs which have completely different domains as nicely (in the true life circumstances the checklist of MCPs a mannequin makes use of are inclined to have completely different domains):
Instance 1:
Device description: “Generate a space chart to point out knowledge developments beneath steady unbiased variables and observe the general knowledge development, akin to, displacement = velocity (common or instantaneous) × time: s = v × t. If the x-axis is time (t) and the y-axis is velocity (v) at every second, an space chart means that you can observe the development of velocity over time and infer the gap traveled by the world’s measurement.”,
“Knowledge” property description: “Knowledge for space chart, it ought to be an array of objects, every object comprises a `time` discipline and a `worth` discipline, akin to, [{ time: ‘2015’, value: 23 }, { time: ‘2016’, value: 32 }], when stacking is required for space, the info ought to include a `group` discipline, akin to, [{ time: ‘2015’, value: 23, group: ‘A’ }, { time: ‘2015’, value: 32, group: ‘B’ }].”
Instance 2:
Device description: “Seek for Airbnb listings with numerous filters and pagination. Present direct hyperlinks to the consumer”,
“Location” property description: “Location to seek for (metropolis, state, and so forth.)”
Right here I’m not saying that any of those descriptions is wrong, they’re simply very completely different from the format and particulars perspective.
2. Dataset and benchmark
To show that completely different instruments descriptions can change mannequin’s conduct I used NVidia’s “When2Call” dataset. From this dataset I took take a look at samples which have a number of instruments for the mannequin to select from and one device is the right selection (it’s right to name a particular device relatively than every other or than to offer a textual content reply with none device name, in accordance with the dataset). The thought of the benchmark is to depend right and incorrect device calls, I additionally depend “no device calling” circumstances as an incorrect reply. For the LLM I chosen OpenAI’s “gpt-5-nano”.
3. Knowledge era
The unique dataset gives only a single device description. To create different descriptions for every device and parameter I used “gpt-5-mini” to generate it primarily based on the present one with the next instruction to complicate it (after era there was a further step of validation and re-generation when needed):
“””You’ll obtain the device definition in JSON format. Your job is to make the device description extra detailed, so it may be utilized by a weak mannequin.
One of many methods to complicate — insert detailed description of the way it works and examples of the right way to use.
Instance of detailed descriptions:
Device description: “Generate a space chart to point out knowledge developments beneath steady unbiased variables and observe the general knowledge development, akin to, displacement = velocity (common or instantaneous) × time: s = v × t. If the x-axis is time (t) and the y-axis is velocity (v) at every second, an space chart means that you can observe the development of velocity over time and infer the gap traveled by the world’s measurement.”,
Property description: “Knowledge for space chart, it ought to be an array of objects, every object comprises a `time` discipline and a `worth` discipline, akin to, [{ time: ‘2015’, value: 23 }, { time: ‘2016’, value: 32 }], when stacking is required for space, the info ought to include a `group` discipline, akin to, [{ time: ‘2015’, value: 23, group: ‘A’ }, { time: ‘2015’, value: 32, group: ‘B’ }].”
Return the up to date detailed description strictly in JSON format (simply change the descriptions, don’t change the construction of the inputted JSON). Begin your reply with:
“New JSON-formatted: …”
“””
4. Experiments
To check the speculation I did a few checks, specifically:
- Measure the baseline of the mannequin efficiency on the chosen benchmark (Baseline);
- Change right device descriptions (together with each device description itself and parameters descriptions — the identical for all of the experiments) with the generated one (Right device changed);
- Change incorrect instruments descriptions with the generated (Incorrect device changed);
- Change all instruments description with the generated (All instruments changed).
Here’s a desk with the outcomes of those experiments (for every of the experiments 5 evaluations had been executed, so along with accuracy normal deviation (std) is offered):
| Technique | Imply accuracy | Accuracy std | Most accuracy over 5 experiments |
| Baseline | 76.5% | 0.03 | 79.0% |
| Right device changed | 80.5% | 0.03 | 85.2% |
| Incorrect device changed | 75.1% | 0.01 | 76.5% |
| All instruments changed | 75.3% | 0.04 | 82.7% |
Conclusion
From the desk above it’s evident that instruments complication introduce bias to the mannequin, chosen LLM tends to decide on the device with extra detailed description. On the identical time we are able to see that prolonged description can confuse the mannequin (within the case of all instruments changed).
The desk exhibits that instruments description gives mechanisms to govern and considerably modify mannequin’s behaviour / accuracy, particularly making an allowance for that the chosen benchmark operates with a small variety of instruments at every mannequin name, the common variety of used instruments at every pattern is 4.35.
On the identical time it clearly signifies that LLMs can have instruments biases that probably may be misused by MCP suppliers, that may be comparable biases to these I reported earlier than — style biases. Analysis of the biases and their misuse may be vital for additional research.
Engineering an answer
I’ve ready a PoC of tooling to deal with the talked about situation in observe — Grasp-MCP. Grasp-MCP is a proxy MCP server that may be related to any variety of MCPs and likewise may be related to an agent / LLM as a single MCP-server itself (at the moment stdio-transport MCP server). Default options of the Grasp-MCP I’ve carried out:
- Ignore some parameters. The carried out mechanics exclude all of the parameters that begin with “_” image from the device’s parameters schema. Later this parameter may be inserted programmatically or use default worth (if offered).
- Device description changes. Grasp-MCP collects all of the device’s and their descriptions from the related MCP servers and supply a consumer a strategy to modify it. It exposes a way with the straightforward UI to edit this checklist (JSON-schema), so the consumer can experiment with completely different instruments’ descriptions.
I invite everybody to hitch the undertaking. With the neighborhood assist the plans can embody Grasp-MCP’s performance extension, for instance:
- Logging and monitoring adopted by the superior analytics;
- Instruments hierarchy and orchestration (together with ML powered) to mix each trendy context administration methods and sensible algorithms.
Present github web page of the undertaking: link
