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

기본 MCP를 넘어서: 의사결정 모델과 Code Mode는 도구 사용을 더 저렴하고 빠르게 만드는가?

Abhishek Rai · arXiv · 2026년 11월 14일

- **연구 문제** 도구가 많은 MCP 환경에서는 스키마와 결과가 매번 컨텍스트에 쌓여 비용이 커지며, 이를 줄이는 code mode와 decision layer의 효과와 결합 효과가 분명하지 않습니다.
- **연구 방법** 같은 게이트웨이에서 플레인 MCP, 라우터와 JSON, code mode, 라우터와 code mode 네 구성을 스위치로 바꿔 비교합니다.
- **주요 결과** 봉인 테스트 분할에서 code mode는 Qwen과 Nemotron의 utility를 각각 0.364와 0.861 높이고 토큰을 70에서 90 퍼센트 줄였습니다. 반환 형태 힌트를 제거하면 Gemma와 Nemotron의 성공률이 크게 떨어졌습니다.

## 에이전트가 많은 MCP 도구를 다룰 때의 비용

에이전트가 수백 개의 MCP 도구에 연결되면 두 종류의 비용이 생깁니다. 모든 도구 스키마가 매 턴 프롬프트에 들어가고, 도구 결과도 매번 모델을 거쳐 다시 복사됩니다. 이 논문은 이 문제를 줄이기 위한 두 설계, 즉 도구 호출을 스크립트로 대신하는 code mode와 호출 전에 도구 부분집합을 고르는 decision layer가 각각 언제 효과적인지, 그리고 둘을 함께 쓰면 이득이 있는지를 묻습니다. 연구 범위는 합성 MCP 환경과 세 가지 오픈 웨이트 에이전트입니다.

## 네 가지 게이트웨이 구성

같은 게이트웨이에서 스위치만 바꿔 네 구성을 비교했습니다. A는 모든 스키마를 노출하는 플레인 MCP이고, B는 라우터가 고른 부분집합을 JSON으로 호출합니다. C는 code mode로 에이전트가 search()로 스텁을 찾고 execute()로 샌드박스에서 스크립트를 실행합니다. D는 라우터가 고른 부분집합에 code mode를 적용하고, 실패하면 JSON으로 fallback합니다. 스텁에는 저자가 직접 작성한 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개 인스턴스와 세 에이전트, 총 1,785회의 직렬 실행으로 구성했습니다. Qwen에서는 code mode가 플레인 MCP보다 utility를 0.364 높였고, Nemotron에서는 0.861 높였습니다. Gemma에서도 방향은 같았지만 구간이 0을 포함했습니다. 토큰은 Qwen에서 84%, Gemma에서 70%, Nemotron에서 90% 줄었습니다. 중심 가설인 라우터와 code mode의 결합은 세 에이전트 모두에서 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개로 검정했습니다. 저자들은 이를 두 약한 에이전트에는 라우터가 이득일 가능성이 있고 가장 강한 Qwen에는 작은 비용일 수 있다는 방향성 증거로 해석합니다. 형태 라우팅은 항상 code mode와 fallback을 쓰는 전략보다 나아지지 않았습니다.

![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쪽에서 그림 영역을 추출했습니다.

## 도구 수가 늘 때의 fallback

도구 수를 42, 200, 2,000개로 늘린 소규모 확인 실험은 Qwen에서 열 개 작업으로 진행했습니다. code mode는 2,000개에서도 토큰과 지연이 거의 평평하게 유지되었습니다. 제한 없는 JSON fallback은 2,000개에서 평균 222.7초와 370K 토큰을 기록했고, 제한된 fallback으로 바꾸자 16초와 34K 토큰, 성공률 0.90으로 줄었습니다. 이는 열 개 작업의 기전 확인이며 정밀한 추정이 아닙니다.

![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)

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/terms/84da7a415b66-low-rank-adaptation-lora)
- [Holm correction](https://refivu.com/terms/9901890e77ae-holm-correction)
- [paired bootstrap](https://refivu.com/terms/63f3236bc607-paired-bootstrap)
- [Model Context Protocol](https://refivu.com/terms/ea3bda424741-model-context-protocol)
- [utility](https://refivu.com/terms/74b841615c84-utility)
- [decision layer](https://refivu.com/terms/869108071309-decision-layer)
- [Gemma-4-26B-A4B](https://refivu.com/terms/0898ebfaf070-gemma-4-26b-a4b)
- [Non-inferiority margin](https://refivu.com/terms/9ab6e4541a97-non-inferiority-margin)
- [task families](https://refivu.com/terms/7b56d02d2cfd-task-families)

## 다른 논문 해설

- [We Have All the Cards: Securing Agent Cards at the Operational Trust Boundary of the Agent2Agent Protocol](https://refivu.com/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/papers/21f25915-d36f-4f26-a265-4e45ef0cc511-distilling-safety-filters-for-filter-free-multi-agent.md)
- [Imitation Bootstrapped Multi-Agent Reinforcement Learning](https://refivu.com/papers/511a869c-410d-47b0-9d94-36dde9bb5cef-imitation-bootstrapped-multi-agent-reinforcement-learning.md)
- [Agentic AI for Discovering Fault-Tolerant Quantum Circuits](https://refivu.com/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/papers/14bd2e4c-85ea-4184-a7c7-04ab89b28c5b-do-verifier-judgments-survive-abstraction-measuring.md)
- [Agent-as-a-Judge](https://refivu.com/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/papers/e90e3a20-2a39-469b-b7ac-0ba1d7d62a97-what-transfers-across-cuneiform-script-level-substrate-and.md)
- [Large Language Models for AI Infrastructure](https://refivu.com/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/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/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/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/papers/8253b14f-42d9-4b98-8337-ac9301c9801c-generalization-testing-of-grid-foundation-models-for-power.md)

---

AI 해설에는 오류가 있을 수 있습니다. [Refivu](https://refivu.com/papers/88efe713-93d8-47d6-b8be-667c299e21ae-beyond-plain-mcp-do-decision-models-and-code)
