Table of Contents
Fetching ...

JSPLIT: A Taxonomy-based Solution for Prompt Bloating in Model Context Protocol

Emanuele Antonioni, Stefan Markovic, Anirudha Shankar, Jaime Bernardo, Lovro Markovic, Silvia Pareti, Benedetto Proietti

TL;DR

JSPLIT addresses prompt bloating in tool-augmented AI agents by introducing a taxonomy-guided filtering pipeline that prunes MCP servers before they are exposed to the LLM. The Taxonomy-MCPResolver classifies queries against a hierarchical taxonomy and maps them to a small set of relevant MCPs, reducing token costs while preserving task performance. The approach is evaluated with Taxonomy-v1 and Taxonomy-v2 across datasets of ~2,000 MCP servers and ~200 queries, showing token-cost reductions of over two orders of magnitude and robust tool-selection accuracy as tool pools scale. The authors also analyze error patterns and propose future directions, such as Taxonomy-v3 and live tooling onboarding, to further enhance scalability and adaptability in dynamic tool ecosystems.

Abstract

AI systems are continually evolving and advancing, and user expectations are concurrently increasing, with a growing demand for interactions that go beyond simple text-based interaction with Large Language Models (LLMs). Today's applications often require LLMs to interact with external tools, marking a shift toward more complex agentic systems. To support this, standards such as the Model Context Protocol (MCP) have emerged, enabling agents to access tools by including a specification of the capabilities of each tool within the prompt. Although this approach expands what agents can do, it also introduces a growing problem: prompt bloating. As the number of tools increases, the prompts become longer, leading to high prompt token costs, increased latency, and reduced task success resulting from the selection of tools irrelevant to the prompt. To address this issue, we introduce JSPLIT, a taxonomy-driven framework designed to help agents manage prompt size more effectively when using large sets of MCP tools. JSPLIT organizes the tools into a hierarchical taxonomy and uses the user's prompt to identify and include only the most relevant tools, based on both the query and the taxonomy structure. In this paper, we describe the design of the taxonomy, the tool selection algorithm, and the dataset used to evaluate JSPLIT. Our results show that JSPLIT significantly reduces prompt size without significantly compromising the agent's ability to respond effectively. As the number of available tools for the agent grows substantially, JSPLIT even improves the tool selection accuracy of the agent, effectively reducing costs while simultaneously improving task success in high-complexity agent environments.

JSPLIT: A Taxonomy-based Solution for Prompt Bloating in Model Context Protocol

TL;DR

JSPLIT addresses prompt bloating in tool-augmented AI agents by introducing a taxonomy-guided filtering pipeline that prunes MCP servers before they are exposed to the LLM. The Taxonomy-MCPResolver classifies queries against a hierarchical taxonomy and maps them to a small set of relevant MCPs, reducing token costs while preserving task performance. The approach is evaluated with Taxonomy-v1 and Taxonomy-v2 across datasets of ~2,000 MCP servers and ~200 queries, showing token-cost reductions of over two orders of magnitude and robust tool-selection accuracy as tool pools scale. The authors also analyze error patterns and propose future directions, such as Taxonomy-v3 and live tooling onboarding, to further enhance scalability and adaptability in dynamic tool ecosystems.

Abstract

AI systems are continually evolving and advancing, and user expectations are concurrently increasing, with a growing demand for interactions that go beyond simple text-based interaction with Large Language Models (LLMs). Today's applications often require LLMs to interact with external tools, marking a shift toward more complex agentic systems. To support this, standards such as the Model Context Protocol (MCP) have emerged, enabling agents to access tools by including a specification of the capabilities of each tool within the prompt. Although this approach expands what agents can do, it also introduces a growing problem: prompt bloating. As the number of tools increases, the prompts become longer, leading to high prompt token costs, increased latency, and reduced task success resulting from the selection of tools irrelevant to the prompt. To address this issue, we introduce JSPLIT, a taxonomy-driven framework designed to help agents manage prompt size more effectively when using large sets of MCP tools. JSPLIT organizes the tools into a hierarchical taxonomy and uses the user's prompt to identify and include only the most relevant tools, based on both the query and the taxonomy structure. In this paper, we describe the design of the taxonomy, the tool selection algorithm, and the dataset used to evaluate JSPLIT. Our results show that JSPLIT significantly reduces prompt size without significantly compromising the agent's ability to respond effectively. As the number of available tools for the agent grows substantially, JSPLIT even improves the tool selection accuracy of the agent, effectively reducing costs while simultaneously improving task success in high-complexity agent environments.
Paper Structure (12 sections, 7 figures)

This paper contains 12 sections, 7 figures.

Figures (7)

  • Figure 1: An example of prompt bloating caused by a massive amount of tools descriptions injected into the agent's context
  • Figure 2: The overall logic of the Taxonomy-MCPResolver component
  • Figure 3: Accuracy of correct tool selection over the number of MCP servers. "Passthrough" represent the vanilla system that embeds all description into the context, "Taxonomy-v1" refers to the use of JSPLIT using the v1 version of the taxonomy, and "Taxonomy-v2" represents JSPLIT using the v2 taxonomy
  • Figure 4: Input token cost for running 200 queries to the LLM over the number of MCP servers. "Passthrough" represent the vanilla system that embeds all description into the context, "Taxonomy-v1" refers to the use of JSPLIT using the v1 version of the taxonomy, and "Taxonomy-v2" represents JSPLIT using the v2 taxonomy
  • Figure 5: Accuracy of tool selection of different models used for the inner loop of the JSPLIT system.
  • ...and 2 more figures