Beyond Plain MCP: Do Decision Models and Code Mode Make Tool Use Cheaper and Faster?
Abhishek Rai
Key points
From the paper's conclusion- 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.
Abstract
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Model Context Protocol (MCP) Tool Descriptions Are Smelly! Towards Improving AI Agent Efficiency with Augmented MCP Tool Descriptions,ACM Transactions on Software Engineering and Methodology · 2026
- Tool Recommendation for Multi-Step Agents: Finding Every Tool a Task NeedsarXiv · 2026
- AgentWeave: Routing Before Reasoning for Efficient Function Calling in Tool-Rich Language ModelsarXiv · 2026
- ToolBottleneckBench: Measuring Tool-Agent Performance under Controlled Pressures and Fixed Harness BudgetsarXiv · 2026
- When Agents Fail: Model or Harness--Who's to Blame?arXiv · 2026
- GatewayBench: Unified Capability and Security Evaluation Platform for MCP GatewaysarXiv · 2026