Scaling Agentic Capabilities, Not Context: Efficient Reinforcement Finetuning for Large Toolspaces

Karan Gupta, Pranav Vajreshwari, Yash Pandya, Raghav Magazine, Akshay Nambi, Ahmed Awadallah

TL;DR

Small Language Models (SLMs) typically fail as autonomous agents in large tool ecosystems because loading massive tool registries quickly overwhelms their limited context windows. This paper introduces ATLAS, a framework that trains SLMs to dynamically manage their own context via iterative tool loading and programmatic execution. By combining this disciplined execution structure with rubric-based reinforcement learning, a 4B parameter model can approach the performance of a 1-trillion-parameter frontier model on complex, long-horizon tasks.

What Problem Does This Paper Address?

Modern AI agents are increasingly deployed in environments like the Model Context Protocol (MCP), where they must coordinate planning and action across hundreds of external APIs, databases, and enterprise workflows. Frontier models handle this tool-space explosion by throwing massive context windows and parameter scales at the problem.

However, this brute-force approach doesn't work for Small Language Models (SLMs), which are crucial for low-latency, cost-constrained, or local deployments. If an SLM eagerly loads every available tool definition upfront, its context window quickly saturates with verbose JSON schemas. This leaves little room for actual reasoning, causes execution errors to compound over long trajectories, and degrades overall efficiency. Furthermore, complex agent tasks rarely have a single verifiable ground truth, making standard "outcome-only" binary rewards too sparse for effective reinforcement learning (RL).

Methods

The authors present ATLAS (Adaptive Tool Loading and Scoped Context), a framework that reframes context acquisition and execution structure as learnable decisions optimized via reinforcement learning.

Figure 1: Context growth and execution structure across MCP agent designs. Traditional MCP agents incur high context costs by loading all tools upfront. ISL and ITL progressively reduce context by scoping server and tool schemas, while ITL+PTC further minimizes prompt growth by moving execution state into programmatic orchestration.

ATLAS relies on two core architectural pillars:

  1. Context Control & Programmatic Orchestration: Instead of preloading all schemas, ATLAS introduces Iterative Server Loading (ISL) and Iterative Tool Loading (ITL). The agent initially sees only a compact index of available servers and tool names, selectively materializing detailed JSON definitions only when needed. This is paired with Programmatic Tool Calling (PTC), where the agent writes a unified Python program executed by a persistent interpreter. This keeps intermediate execution states inside the program memory rather than re-injecting verbose outputs back into the model prompt.
  2. Rubric-Based Reinforcement Finetuning (RFT): To overcome sparse rewards without relying on expensive frontier models during training, ATLAS uses a frontier model (GPT-5) once offline to generate structured, task-specific rubrics. These rubrics decompose success into distinct criteria (task fulfillment, tool appropriateness, grounding, and parameter accuracy). During the actual training loop, a cost-effective SLM judge (Qwen3-30B-Instruct) uses these fixed rubrics to score agent trajectories, providing a stable, dense, and scalable reward signal for Group Relative Policy Optimization (GRPO).
Figure 2: ATLAS Reinforcement Finetuning approach with Rubrics as Rewards and SLM Judge.

Datasets

  • MCPBench: A benchmark consisting of 28 live MCP servers exposing 257 tools across real-world domains (search, finance, databases). The authors expanded this into a high-quality training set of 304 tasks (stratified by Easy, Medium, and Hard difficulties and verified via a 1T parameter model) and an in-distribution test set of 104 tasks.
  • ATLAS-Test: A newly introduced out-of-distribution (OOD) evaluation set consisting of 100 tasks spanning 11 completely unseen MCP servers. This dataset specifically tests the agent's ability to generalize to novel tool combinations and schemas under distribution shift.

Key Insights and Ideas

  • The Structure-Learning Synergy: Structured execution (like writing Python code instead of JSON loops) yields limited success on its own under cold-start conditions. However, it provides a highly stable execution substrate that prevents early compounding errors, allowing reinforcement learning to achieve massive gains.
  • Rubrics Democratize Judging: Holistic trajectory evaluation is difficult for smaller models. However, by breaking evaluation down into concrete, well-specified rubric criteria, an open-source SLM judge can provide a cleaner, more consistent learning signal than an unconstrained frontier model judge (like GPT-4o).
  • Resilience to Reward Hacking: Agents trained with ITL and PTC showed a unique trend: they achieved slightly lower training rewards across steps but significantly outperformed baselines on validation sets. This indicates that bounding the context space forces the model to prioritize true task completion over "gaming" the judge's prompt.

Key Results

  • Closing the Gap to Frontier Models: On MCPBench, the ATLAS-trained Qwen3-4B-Instruct achieved a Task Fulfillment (TF) score of 4.15/10, approaching the performance of the 1-trillion-parameter frontier baseline, Kimi-K2 Thinking (4.38/10), despite operating under far tighter parameter and context constraints.
  • SLM Judge Superiority: Under rubric-based supervision, the open-source Qwen3-30B judge consistently outperformed a generic GPT-4o judge, boosting the base 4B model's server-loading performance from 3.25 to 3.87.
  • Out-of-Distribution Generalization: On the unseen servers of the ATLAS-Test set, the ATLAS framework demonstrated robust generalization. A Qwen3-30B model trained with ATLAS rubrics achieved a TF score of 4.62/10, outperforming the frontier baseline's score of 3.70/10.
Figure 3: ATLAS reinforcement finetuning training and validation curves under ISL, ITL, and ITL+PTC, showing composite training rewards (left) and task-fulfillment-based validation perfor- mance (right).

Limitations and Future Work

The authors note that they have not yet successfully applied rubric-based rewards directly to Programmatic Tool Calling (PTC). This is due to the inherent difficulty of automatically generating concrete, structured rubrics over raw executable code blocks rather than natural language reasoning traces.

Additionally, while PTC reduces execution failures, synthesizing complex Python orchestration code remains a bottleneck for very small models under cold-start conditions. A promising direction for future work includes bootstrapping the policy with a small set of high-quality programmatic demonstrations before initiating reinforcement learning.

Summary updated

BibTeX
@inproceedings{gupta2026scaling,
  author = {Karan Gupta and Pranav Vajreshwari and Yash Pandya and Raghav Magazine and Akshay Nambi and Ahmed Awadallah},
  title = {{Scaling Agentic Capabilities, Not Context: Efficient Reinforcement Finetuning for Large Toolspaces}},
  booktitle = {Reliable Autonomy @ ICLR},
  year = {2026},
  url = {https://openreview.net/forum?id=l0RiU7HIyt},
}
Figure