# Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster?

プレーンMCPを超えて：Decision ModelsとCode Modeはツール利用をより安く速くするか？

Abhishek Rai · arXiv · 2026年11月14日

- **課題** ツールが多いMCP環境では、スキーマと結果が毎回コンテキストに積み重なり、コストが大きくなります。これを減らすcode modeとdecision layerの効果、そして両者を組み合わせた効果は明らかではありません。
- **手法** 同じゲートウェイで、プレーンMCP、ルーターとJSON、code mode、ルーターとcode modeの4つの構成をスイッチで切り替えて比較します。
- **結果** 封印テスト分割では、code modeはQwenとNemotronのutilityをそれぞれ0.364と0.861高め、トークンを70から90%削減しました。返り値の形式に関するヒントを取り除くと、GemmaとNemotronの成功率が大きく下がりました。

## 多数のMCPツールを扱うエージェントのコスト

エージェントが数百個のMCPツールに接続されると、2種類のコストが発生します。すべてのツールスキーマが毎ターンプロンプトに入り、ツールの結果も毎回モデルを経由して再度コピーされます。この論文は、この問題を減らすための2つの設計、すなわちツール呼び出しをスクリプトで代替するcode modeと、呼び出し前にツールのサブセットを選ぶdecision layerが、それぞれいつ効果的かを問います。さらに、両者を併用すると利益があるかどうかも問いです。研究の範囲は、合成MCP環境と3種類のオープンウェイトエージェントです。

## 4つのゲートウェイ構成

同じゲートウェイでスイッチだけを変えて、4つの構成を比較しました。Aはすべてのスキーマを公開するプレーンMCPです。Bはルーターが選んだサブセットをJSONで呼び出します。Cはcode modeで、エージェントがsearch()でスタブを探し、execute()でサンドボックス内にスクリプトを実行します。Dはルーターが選んだサブセットにcode modeを適用し、失敗した場合はJSONにフォールバックします。スタブには著者らが自ら書いたreturn-shape hintsを追加しました。このヒントを取り除いた設定は、拡張実験で別途測定しています。utilityは成功率から、トークンと遅延のコストを引いた値です。

主な重みは、トークンが0.01、遅延が0.002です。

![Table 1: The four gateway configurations.D-oracleuses the gold tool list at zero router cost](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae/figures/figure-143efdfd1866898443a764fc702c797c.png?thumb=512)

**Table 1** : The four gateway configurations.D-oracleuses the gold tool list at zero router cost.

[出典](https://arxiv.org/abs/2611.19123v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abhishek Rai · Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster? · 論文の図を引用 · 元のPDFの3ページ目から図の部分を抽出しています。

![Table 7: ∆Uon the original 119 instances under different weights; ∗: family-resampled 95% CI excludes zero (unadjusted). The primary setting is the middle colu…](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae/figures/figure-818d5fb36fe8bf0f28fe68f90bceff69.png?thumb=512)

**Table 7** :∆Uon the original 119 instances under different weights; ∗: family-resampled 95% CI excludes zero (unadjusted). The primary setting is the middle column.

[出典](https://arxiv.org/abs/2611.19123v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abhishek Rai · Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster? · 論文の図を引用 · 元のPDFの9ページ目から図の部分を抽出しています。

## 封印テスト分割での確認結果

事前登録された確認評価は、119個のインスタンスと3つのエージェント、合計1,785回の直列実行で構成しました。Qwenでは、code modeがプレーンMCPよりutilityを0.364高め、Nemotronでは0.861高めました。Gemmaでも方向は同じでしたが、区間が0を含んでいました。トークンは、Qwenで84%、Gemmaで70%、Nemotronで90%減りました。中心となる仮説である、ルーターとcode modeの組み合わせは、3つのエージェントすべてでHolm補正後に有意ではありませんでした。この結果は効果がないことの証明ではなく、結論を出すのが難しいことを意味します。家族単位の再標本化では、GemmaとNemotronのH4結果が、補正後に有意性を失いました。

![Table 2: Confirmatory results, sealed test split, 119 matched instances per cell.U=success− 0.01tokens/1000−0.002latency s (mean). Medians are shown because a…](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae/figures/figure-10a4b1526cc0649a67eef44b8af2568c.png?thumb=512)

**Table 2** : Confirmatory results, sealed test split, 119 matched instances per cell.U=success− 0.01tokens/1000−0.002latency s (mean). Medians are shown because a few runs are very long (GemmaC: one 890s run and three others above 60s, so its mean latency is 20.9s versus a 6.4s median).

[出典](https://arxiv.org/abs/2611.19123v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abhishek Rai · Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster? · 論文の図を引用 · 元のPDFの5ページ目から図の部分を抽出しています。

![Table 3: The 12 pre-registered primary comparisons (endpointU,λ ℓ = 0.002, 10,000 bootstrap resamples, Holm over 12). Left: the pre-registered analysis, which…](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae/figures/figure-dc184265b5a69ade372ceb64a66eeec2.png?thumb=512)

**Table 3** : The 12 pre-registered primary comparisons (endpointU,λ ℓ = 0.002, 10,000 bootstrap resamples, Holm over 12). Left: the pre-registered analysis, which resamples instances. Right: an extension that resamples the 21 task families, which respects the clustering of instances within families.

[出典](https://arxiv.org/abs/2611.19123v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abhishek Rai · Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster? · 論文の図を引用 · 元のPDFの6ページ目から図の部分を抽出しています。

## return-shape hintsの影響

拡張実験1では、同じ119個のテストインスタンスで、ヒントを除いたcode modeを、ヒントありのCと比較しました。ヒントは著者らが直接作成したため、この結果から分かるのは返り値の情報が重要だということです。ヒントを作る特定の方法が最善であることまでは示していません。

![Table 4: Extension 1: effect of return-shape hints on code-mode success and utility, sealed test split (119 instances, 21 families). The hints also cut tokens:…](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae/figures/figure-289d4d15476c41ccc20a4eea31f511c8.png?thumb=512)

**Table 4** : Extension 1: effect of return-shape hints on code-mode success and utility, sealed test split (119 instances, 21 families). The hints also cut tokens:−1,598(Qwen),−4,372(Gemma),−6,104 (Nemotron), all intervals excluding zero.

[出典](https://arxiv.org/abs/2611.19123v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abhishek Rai · Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster? · 論文の図を引用 · 元のPDFの7ページ目から図の部分を抽出しています。

## ルーターが役立つ場面

H3、すなわちルーターとcode modeの組み合わせが、code mode単独より優れているかどうかは、追加の119個のインスタンスを加えて238個で検定しました。著者らはこれを、2つの弱いエージェントではルーターが利益になる可能性があり、最も強いQwenでは小さなコストになりうるという方向性の証拠と解釈しています。形態ルーティングは、常にcode modeとフォールバックを使う戦略より良くなりませんでした。

![Table 5: Extension 2: H3 on 119 unseen test instances and pooled with the original 119. Intervals resample the 21 task families. The “seeds 3–5” rows are unadj…](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae/figures/figure-0f702f029f3fbb05613e1f2617ef96ce.png?thumb=512)

**Table 5** : Extension 2: H3 on 119 unseen test instances and pooled with the original 119. Intervals resample the 21 task families. The “seeds 3–5” rows are unadjusted descriptive replications.

[出典](https://arxiv.org/abs/2611.19123v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abhishek Rai · Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster? · 論文の図を引用 · 元のPDFの7ページ目から図の部分を抽出しています。

## ツール数が増えたときのフォールバック

ツール数を42、200、2,000個に増やした小規模な確認実験は、Qwenで10件のタスクを使って行いました。code modeは2,000個でもトークンと遅延がほぼ一定に保たれました。制限のないJSONフォールバックでは、2,000個のときに平均222.7秒と370Kトークンを記録しました。制限付きのフォールバックに変えると、16秒、34Kトークン、成功率0.90まで下がりました。これは10件のタスクでのメカニズムの確認であり、精密な推定ではありません。

![Table 6: Confirmatory scale arm (Qwen3.8-27B, test seed 0, 10 tasks, serial;Duses the bounded fallback). Descriptive only](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae/figures/figure-13c40a3a9ec509fc57ac2c669d5d52f8.png?thumb=512)

**Table 6** : Confirmatory scale arm (Qwen3.8-27B, test seed 0, 10 tasks, serial;Duses the bounded fallback). Descriptive only.

[出典](https://arxiv.org/abs/2611.19123v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abhishek Rai · Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster? · 論文の図を引用 · 元のPDFの8ページ目から図の部分を抽出しています。

![Table 11: Scale arm (Qwen3.8-27B, 10 tasks, one seed). Plain MCP needs about 47K schema tokens per turn at 200 tools and cannot run at 2,000](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae/figures/figure-50f5b8be9d433559fce54143b940e210.png?thumb=512)

**Table 11** : Scale arm (Qwen3.8-27B, 10 tasks, one seed). Plain MCP needs about 47K schema tokens per turn at 200 tools and cannot run at 2,000.

[出典](https://arxiv.org/abs/2611.19123v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abhishek Rai · Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster? · 論文の図を引用 · 元のPDFの11ページ目から図の部分を抽出しています。

## 外的妥当性と検出力の限界

主な評価では、実際のMCPサーバーではなく合成環境を使い、ツールは即座に返されました。タスクのインスタンスは21個のテンプレートから作られており、互いに独立していません。事前登録のプロトコルは比較ごとに約300組のペアを前提としていましたが、確認分割は119個でした。追加実験も238個にとどまりました。ヒントは著者らが自ら作成し、開発データで調整されています。また、開発段階でのルーターの比較と、確認段階でファインチューニングしたルーターは同じ条件ではないため、直接比較するのは難しいです。

![Table 8: Development seeds, hinted stubs, one run per cell.B/Duse a prompted LLM router (dif- ferent family from the agent) with router tokens counted. Nemotro…](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae/figures/figure-ac7b5630c6a6551b6841b8fef279648b.png?thumb=512)

**Table 8** : Development seeds, hinted stubs, one run per cell.B/Duse a prompted LLM router (dif- ferent family from the agent) with router tokens counted. Nemotron’s decision-layer configurations were run only on the 39-task latency set (Table 10).

[出典](https://arxiv.org/abs/2611.19123v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abhishek Rai · Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster? · 論文の図を引用 · 元のPDFの9ページ目から図の部分を抽出しています。

![Table 9: Effect of return-shape hints in code-mode stubs (development seeds, 118–119 cells)](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae/figures/figure-021890d20aba24a7794e9707e50275cd.png?thumb=512)

**Table 9** : Effect of return-shape hints in code-mode stubs (development seeds, 118–119 cells).

[出典](https://arxiv.org/abs/2611.19123v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abhishek Rai · Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster? · 論文の図を引用 · 元のPDFの10ページ目から図の部分を抽出しています。

![Table 10: Serial latency, 39 tasks, one seed (development). Router time is included inBandD](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae/figures/figure-7ea662f73a8d0e1be5d1d5fab0e19d02.png?thumb=512)

**Table 10** : Serial latency, 39 tasks, one seed (development). Router time is included inBandD.

[出典](https://arxiv.org/abs/2611.19123v1) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Abhishek Rai · Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster? · 論文の図を引用 · 元のPDFの11ページ目から図の部分を抽出しています。

## 論文情報

- **著者**: Abhishek Rai
- **学会・ジャーナル**: arXiv · プレプリント
- **公開日**: 2026年11月14日
- **登録日**: 2026年11月17日
- **更新日**: 2026年11月14日
- **バージョン**: v1
- **arXiv**: 2611.19123
- **カテゴリ**: cs.SE · cs.AI · cs.CL
- **ライセンス**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **掲載内容**: 論文情報・解説・論文の図

[元論文 ↗](https://arxiv.org/abs/2611.19123v1) · [PDF ↗](https://arxiv.org/pdf/2611.19123v1)

この解説は、Refivuの韓国語解説をAIで翻訳したものです。不正確な翻訳や誤りが含まれる可能性があります。論文と図の利用条件は各出典に従います。

## アブストラクト

Model Context Protocol (MCP) gateways manage tool catalogs for language model agents using two primary paradigms: code mode where agents write scripts against tool stubs and decision layers which are cheap routers that preselect tool subsets. Using a controlled harness across 12 servers, up to 1,958 distractor tools, and three open-weight agents including Qwen, Gemma, and Nemotron, we present a preregistered evaluation on a sealed test split to determine when each approach succeeds. Code mode substantially outperforms plain MCP, cutting token usage by 70 to 90 percent while significantly boosting utility. Declaring return-shape hints in code mode stubs is a first-order variable, swinging success by up to 39.5 points for lower-performing agents, an effect larger than adding a router. The central hypothesis that a decision layer in front of code mode beats code mode alone is not confirmed, showing minor, statistically non-significant improvements for weaker agents and a slight cost for the strongest. We publicly release our harness, a finetuned 4B tool selection model, and all evaluation traces to support robust community experimentation on local AI privacy and agent architectures.

## この論文を引用

Abhishek Rai (2026). Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster?. arXiv:2611.19123v1. https://arxiv.org/abs/2611.19123v1

**BibTeX**

```
@misc{rai2026beyond,
  title = {{Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster?}},
  author = {Abhishek Rai},
  year = {2026},
  eprint = {2611.19123},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.19123v1}
}
```

## この論文の用語

- [LoRA](https://refivu.com/ja/terms/84da7a415b66-low-rank-adaptation-lora)
- [Holm correction](https://refivu.com/ja/terms/9901890e77ae-holm-correction)
- [paired bootstrap](https://refivu.com/ja/terms/63f3236bc607-paired-bootstrap)
- [Model Context Protocol](https://refivu.com/ja/terms/ea3bda424741-model-context-protocol)
- [utility](https://refivu.com/ja/terms/74b841615c84-utility)
- [Non-inferiority margin](https://refivu.com/ja/terms/9ab6e4541a97-non-inferiority-margin)

## ほかの論文解説

- [We Have All the Cards: Securing Agent Cards at the Operational Trust Boundary of the Agent2Agent Protocol](https://refivu.com/ja/papers/cd6a0a5f-90c9-460a-83d6-55b002515aa1-we-have-all-the-cards-securing-agent-cards.md)
- [Distilling Safety Filters for Filter-free Multi-agent RL](https://refivu.com/ja/papers/21f25915-d36f-4f26-a265-4e45ef0cc511-distilling-safety-filters-for-filter-free-multi-agent.md)
- [Imitation Bootstrapped Multi-Agent Reinforcement Learning](https://refivu.com/ja/papers/511a869c-410d-47b0-9d94-36dde9bb5cef-imitation-bootstrapped-multi-agent-reinforcement-learning.md)
- [Agentic AI for Discovering Fault-Tolerant Quantum Circuits](https://refivu.com/ja/papers/e6680a5e-8c8b-48e6-aa57-a669a9a0c6a1-agentic-ai-for-discovering-fault-tolerant-quantum-circuits.md)
- [Do Verifier Judgments Survive Abstraction? Measuring Verification Transport for LLM Agent Evaluation](https://refivu.com/ja/papers/14bd2e4c-85ea-4184-a7c7-04ab89b28c5b-do-verifier-judgments-survive-abstraction-measuring.md)
- [Agent-as-a-Judge](https://refivu.com/ja/papers/a60576aa-2557-4d3a-8639-867ad1be95ce-agent-as-a-judge.md)
- [What Transfers Across Cuneiform? Script-Level Substrate and Language-Specific Regularities via Segmentation and Representation](https://refivu.com/ja/papers/e90e3a20-2a39-469b-b7ac-0ba1d7d62a97-what-transfers-across-cuneiform-script-level-substrate-and.md)
- [Large Language Models for AI Infrastructure](https://refivu.com/ja/papers/b11f1865-65b1-455a-a5ea-a71af32e2f32-large-language-models-for-ai-infrastructure.md)
- [A predictive, per-engine energy roofline of the Apple Neural Engine](https://refivu.com/ja/papers/c70f76ca-99fd-4b11-8a8f-176ceae3f249-a-predictive-per-engine-energy-roofline-of-the.md)
- [Ask Precisely, Assume Wisely: Interactive Evaluation of Ambiguity Resolution in Large Language Models](https://refivu.com/ja/papers/0528086c-4384-4c1a-a1a0-7ad245fb8b63-ask-precisely-assume-wisely-interactive-evaluation-of.md)
- [Understanding the Role of Reasoning Data in Pretraining](https://refivu.com/ja/papers/c130a474-a6eb-4156-877e-f96974963a74-understanding-the-role-of-reasoning-data-in-pretraining.md)
- [Generalization Testing of Grid Foundation Models for Power Flow and Optimal Power Flow](https://refivu.com/ja/papers/8253b14f-42d9-4b98-8337-ac9301c9801c-generalization-testing-of-grid-foundation-models-for-power.md)

---

AI解説には誤りが含まれることがあります。 [Refivu](https://refivu.com/ja/papers/88efe713-93d8-47d6-b8be-667c299e21ae-beyond-plain-mcp-do-decision-models-and-code)
