Information Fidelity in Tool-Using LLM Agents: A Martingale Analysis of the Model Context Protocol

Flint Xiaofeng Fan, Cheston Tan, Roger Wattenhofer, Y. J. Ong

TL;DR

As LLM agents move from chatbots to autonomous tool-users, the risk of "hallucination cascades" grows. This paper provides the first theoretical proof that for agents using the Model Context Protocol (MCP), cumulative errors grow only linearly—not exponentially—with deviations bounded by $O(\sqrt{T})$. The authors demonstrate that periodic "re-grounding" every 9 steps is the "magic number" for maintaining high information fidelity.

What Problem Does This Paper Address?

Large Language Models (LLMs) are fundamentally "frozen" in time based on their training data. To act in the real world, they use tools and external data via protocols like Anthropic’s Model Context Protocol (MCP).

However, every time an agent calls a tool, there is a chance for a small error: a slight semantic drift, a misread number, or a factual hallucination. In a long chain of sequential tool calls (e.g., a financial agent researching a stock over 20 steps), these tiny errors can compound. Until now, we didn't know if these errors would snowball into a catastrophic "hallucination cascade" or if they would remain manageable. This paper seeks to provide a rigorous mathematical "safety envelope" for agent reliability.

Methods

The authors approach the problem by modeling LLM-tool interactions as an adaptive stochastic process. Their methodology consists of three main pillars:

  1. Hybrid Distortion Metric ($\Delta_t$): To measure "error," they created a metric that combines discrete weighted fact matching (did the agent get the specific entities right?) with continuous semantic similarity (is the overall meaning preserved in embedding space?).
  2. Martingale Construction: They treat the sequence of tool calls as a "martingale"—a mathematical model of a fair game where the future expectation is equal to the current value. By constructing a "Distortion Martingale," they can apply the Azuma-Hoeffding inequality.
  3. Concentration Bounds: They prove that the total distortion $D(T)$ stays tightly concentrated around its expected value. Specifically, they show that while the average error grows linearly, the "wiggle room" or deviation from that average only grows at a sub-linear rate of $O(\sqrt{T})$.

Datasets

To isolate how errors propagate (rather than just measuring if a tool is "broken"), the authors used deterministic, cached data sources:

  • Knowledge Retrieval Tool: A curated corpus of 5,000 factual entries across eight domains (Science, History, Finance, etc.).
  • Financial Data Tool: Cached JSON snapshots of market data for 10 major symbols (AAPL, MSFT, etc.) from January 2024.
  • Models Evaluated: The framework was validated using Qwen2-7B, Llama-3-8B, and Mistral-7B.

Key Insights and Ideas

  • The "Effective Information Horizon": Errors don't haunt an agent forever. Because the influence of past steps decays exponentially ($\beta^j-i$), an error made at step 1 has almost zero impact by step 10.
  • Linearity is a Feature: The most important finding is that error growth is linear, not exponential. This rules out "chaotic" failure modes where a single mistake leads to an immediate, total system collapse.
  • The Power of Re-grounding: The math suggests that "re-grounding"—forcing the agent to check its facts against an authoritative source—effectively resets the error chain.
  • Protocol Over Architecture: Interestingly, all three tested models (Qwen, Llama, Mistral) showed nearly identical error patterns. This suggests that information fidelity is a property of the interaction protocol (MCP) and the task structure, rather than the specific "brain" of the LLM.

Key Results

  • The 9-Step Rule: For typical agent configurations, the "effective horizon" is approximately 9 steps. The authors recommend a hard re-grounding or context reset at this interval to prevent drift.
  • Semantic Stability: Increasing the weight of semantic similarity ($\lambda$) in the agent's objective reduces measured distortion by up to 80%. "Meaning" is more stable than "exact wording."
  • Theoretical Validation: Empirical tests perfectly matched the $O(\sqrt{T})$ theoretical envelopes. Even under "stress tests" with high dependency between steps, the models stayed within the predicted safety margins.
  • Safety Margins: In baseline tests, the models maintained a "safety margin" of 1.6x to 1.8x, meaning the actual errors were significantly lower than the theoretical worst-case bounds.

Limitations and Future Work

While a landmark for agent theory, the paper notes several areas for expansion:

  • Single-Agent Focus: The current analysis looks at one agent and its tools. Multi-agent systems, where agents talk to each other, likely have much more complex error propagation dynamics.
  • Deterministic Tools: The experiments used "perfect" cached tools. In the real world, tools themselves can be flaky or return noisy data, which would add another layer of stochasticity.
  • Metric Weighting: The current metric prioritizes "fact recall" (finding the right info) over "precision" (not adding extra info). Future work could explore different weighting schemes for different industries (e.g., higher precision for medical agents).
  • Adaptive Re-grounding: Instead of re-grounding every 9 steps, the authors suggest developing "online distortion estimators" that tell the agent to stop and check its facts only when it senses it's drifting.

Summary updated

Abstract

As AI agents powered by large language models (LLMs) increasingly use external tools for high-stakes decisions, a critical reliability question arises: how do errors propagate across sequential tool calls? We introduce the first theoretical framework for analyzing error accumulation in Model Context Protocol (MCP) agents, proving that cumulative distortion exhibits linear growth and high-probability deviations bounded by $O(\sqrt{T})$. This concentration property ensures predictable system behavior and rules out exponential failure modes. We develop a hybrid distortion metric combining discrete fact matching with continuous semantic similarity, then establish martingale concentration bounds on error propagation through sequential tool interactions. Experiments across Qwen2-7B, Llama-3-8B, and Mistral-7B validate our theoretical predictions, showing empirical distortion tracks the linear trend with deviations consistently within $O(\sqrt{T})$ envelopes. Key findings include: semantic weighting reduces distortion by 80\%, and periodic re-grounding approximately every 9 steps suffices for error control. We translate these concentration guarantees into actionable deployment principles for trustworthy agent systems.
BibTeX
@misc{fan2026information,
  author = {Flint Xiaofeng Fan and Cheston Tan and Roger Wattenhofer and Y. J. Ong},
  title = {{Information Fidelity in Tool-Using LLM Agents: A Martingale Analysis of the Model Context Protocol}},
  year = {2026},
  eprint = {2602.13320},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.13320},
}
Figure