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

Flint Xiaofeng Fan, Cheston Tan, Roger Wattenhofer, Yew-Soon Ong

TL;DR

When LLM agents call external tools in a sequence, do early mistakes cascade into an exponential disaster? This paper provides the first theoretical proof that error accumulation actually grows at most linearly, with deviations tightly bounded sublinearly by $O(\sqrt{T})$, ruling out chaotic exponential blowups and offering practical engineering levers like re-grounding every 9 steps to keep agents on track.

What Problem Does This Paper Address?

As LLM agents are increasingly deployed in safety-critical domains like finance and medicine, they rely heavily on external tools to fetch real-time data. Frameworks like Anthropic's Model Context Protocol (MCP) standardize this integration. However, each tool call introduces a risk of factual errors or semantic drift.

Because agent queries are sequential and adaptive—meaning the next question depends entirely on the previous answer—there has been a persistent fear of chaotic, compounding error propagation. Until now, the community lacked a rigorous mathematical framework to quantify how these errors accumulate over long reasoning chains, leaving developers without formal reliability guarantees.

Methods

The authors introduce an Information Fidelity Framework that models sequential tool use as an adaptive stochastic process.

  1. Hybrid Semantic Distortion Metric ($\Delta_t$): To accurately measure error, they combine discrete fact-matching (using Noun-Phrase chunking and weighted Jaccard distance) with continuous semantic similarity (using sentence embeddings via all-MiniLM-L6-v2). A tuning parameter ($\lambda$) balances strict factual correctness against nuanced semantic drift.
  2. Martingale Analysis: They model the interaction history as a filtration and construct a Doob martingale for cumulative distortion. By assuming that the influence of past responses decays exponentially over time ($\phi(i,j) = \beta^{j-i}$), they prove a bounded-difference property. Applying Azuma's inequality yields high-probability concentration bounds showing that deviations from expected error grow sublinearly at $O(\sqrt{T})$.
Figure 1: MCP standardizes LLM-tool integration through a unified JSON-RPC interface (bottom), replacing custom per-tool connections (top) with centralized schema valida- tion, context management, and uncertainty propagation.
Figure 2: Dependency graph for MCP interactions. Solid ar- rows indicate direct influence ϕ(i, i+1) = β, and the dashed arrow shows long-range decay ϕ(i, j) = βj−i. This expo- nential decay structure enables us to prove that distortion deviations remain sublinear, even with adaptive queries.

Datasets

To isolate the LLM's internal error propagation from external tool unpredictability, the authors built deterministic, cached tools for evaluation:

  • Knowledge Retrieval Corpus: A curated dataset of 5,000 factual entries across eight domains (history, science, technology, arts, sports, geography, literature, mathematics).
  • Financial Data Snapshot: Daily OHLCV (Open, High, Low, Close, Volume) market data for 10 major stock symbols covering January 2024.

No newly introduced public benchmarks were established; the focus was on controlled, reproducible simulation tracks.

Key Insights and Ideas

  • The "Effective Information Horizon": Because the influence of past responses decays exponentially, errors have a finite range. For typical decay rates ($\beta = 0.7$), an error's impact drops below 5% after about 9 steps. This provides a clear mathematical justification for periodic "re-grounding" (clearing or resetting context with authoritative data).
  • Exponential Blowup is Ruled Out: The core mathematical finding is that full adaptivity does not cause chaotic variance. The error accumulation remains tightly concentrated around a predictable linear trajectory, ensuring system stability.
  • Semantic Nuance Matters: Purely factual matching over-penalizes benign wording changes. Incorporating embedding-based similarity ($\lambda > 0$) reveals that LLMs maintain semantic coherence far better than strict keyword matching suggests.

Key Results

The theoretical bounds were empirically validated across three popular open-source models: Qwen2-7B-Instruct, Llama-3-8B-Instruct, and Mistral-7B-Instruct-v0.3.

  • Linear Growth & Sublinear Deviation: Across all models, cumulative distortion grew linearly at roughly 0.5 per step, with empirical deviations consistently staying well within the predicted $O(\sqrt{T})$ safety envelopes.
  • 80% Distortion Reduction: Increasing the semantic weight ($\lambda$) from 0 (pure fact match) to 1 (pure semantic embedding) reduced measured distortion by approximately 80-81% across all architectures, showing that semantic continuity buffers factual drift.
  • Graceful Degradation: Even under extreme dependency stress tests ($\beta = 0.98$), where past steps heavily influenced future queries, the models avoided exponential error explosion, validating the robustness of the martingale concentration bounds.
Baseline distortion accumulation over 10 tool calls
Figure 4: Lambda sweep: semantic weighting effect. Dis- tortion for λ ∈{0, 0.25, 0.5, 0.75, 1.0} at T = 30, β = 0.7 (8 chains/config). Solid: empirical mean ±1σ; dotted: cali- brated bounds.

Limitations and Future Work

  • Single-Agent & Deterministic Focus: The framework currently assumes a single agent interacting with deterministic, cached tools. Real-world applications often feature multi-agent systems and stochastic tool responses (e.g., fluctuating APIs), which are not yet modeled.
  • Recall over Precision: The distortion metric prioritizes fact recall over precision, meaning alternative weighting schemes might be needed to capture different error modes (like hallucinations of entirely new, incorrect facts).
  • Future Directions: The authors suggest extending this analysis to multi-agent error propagation, relaxing the exponential decay assumptions, and developing online distortion estimation techniques for real-time production monitoring.

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 Yew-Soon 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