← Back to Paper Radar

ToolScope: Enhancing LLM Agent Tool Use through Tool Merging and Context-Aware Filtering

Marianne Menglin Liu, Daniel García, Fjona Parllaku, Vikas Upadhyay, Syed Fahad Allam Shah, Dan Roth
arXiv.org | 2025
ToolScope improves LLM agent tool selection with two steps. It first merges redundant, overlapping tools and uses an LLM-based auto-correction step to audit the merges. It then retrieves only the most relevant tools for each query, so large toolsets fit within context limits while selection accuracy improves.

Problem Statement

Real-world toolsets (API hubs, MCP servers, enterprise tool registries) often contain tools with near-duplicate names and descriptions. This ambiguity confuses LLMs during tool selection. Large toolsets also exceed or crowd the context window, so not every tool can be presented, and simply truncating the list loses relevant tools. Existing tool-retrieval work largely ignores redundancy in the toolset itself.

Key Novelty

  • ToolScopeMerger: automatically detects and consolidates semantically redundant tools, framing toolset de-duplication as a preprocessing step for agent tool use.
  • Auto-Correction mechanism: an audit loop that verifies proposed tool merges and repairs incorrect ones, reducing the risk of collapsing tools that are functionally distinct.
  • ToolScopeRetriever: a context-aware ranking and filtering module that selects a compact, query-relevant subset of tools to fit context budgets without sacrificing selection accuracy.

Evaluation Highlights

  • Tool selection accuracy improves by 8.38% to 38.6% over baselines.
  • Gains hold across three state-of-the-art LLMs and three open-source tool-use benchmarks, suggesting the approach generalizes across models and datasets.

Signal Assessment

4/10 This is a practical, well-motivated systems contribution. It combines tool de-duplication with retrieval-based filtering and reports sizable accuracy gains. Its building blocks (semantic clustering/merging, LLM self-verification, retrieval and reranking) are established techniques, so it is a solid engineering advance rather than a conceptual shift.

Methodology

  1. Analyze the toolset offline to identify redundant tools with overlapping names, descriptions and functionality, likely through semantic similarity or clustering.
  2. Merge the redundant tools into consolidated entries, then run Auto-Correction to audit each merge and fix incorrect consolidations.
  3. At inference time, use ToolScopeRetriever to score and rank the merged tools against the user query and keep only the top relevant subset.
  4. Pass the filtered, de-duplicated toolset to the LLM agent for tool selection, then evaluate selection accuracy across multiple LLMs and benchmarks.

System Components

ToolScopeMerger

Detects semantically overlapping or redundant tools and consolidates them, which reduces ambiguity and toolset size.

Auto-Correction

An audit step, likely LLM-driven, that checks each proposed merge for correctness and fixes or reverts erroneous merges.

ToolScopeRetriever

A query-conditioned ranking and filtering module that compresses the toolset to the most relevant tools so it fits the context window.

LLM Agent (tool selector)

The downstream LLM that selects and invokes a tool from the reduced, disambiguated candidate set.

Results

Metric/Benchmark Baseline This Paper Delta
Tool selection accuracy (3 open-source benchmarks) Raw toolset / standard selection ToolScope (Merger + Retriever) +8.38% to +38.6%
Generalization across LLMs (3 SOTA models) Per-model baseline Consistent improvement Positive across all models (per abstract)
Context efficiency Full or truncated toolset in prompt Compressed, query-relevant subset Toolset fits context limits without accuracy loss (qualitative)

Key Takeaways

  • Audit and de-duplicate your tool registry before deployment. Overlapping tool names and descriptions are a measurable source of selection errors, not just cosmetic clutter.
  • Automated merging needs a verification step. An LLM-based audit and correction pass helps avoid merging tools whose functionality only looks similar on the surface.
  • For agents with large toolsets (MCP servers, API marketplaces), retrieve query-relevant tools rather than including all of them. This saves context and can improve accuracy.
  • Treat merging and retrieval as complementary. De-duplication makes retrieval cleaner, and retrieval makes large deduplicated sets tractable, so the two together likely matter more than either alone.

Abstract

Large language model (LLM) agents rely on external tools to solve complex tasks, but real-world toolsets often contain redundant tools with overlapping names and descriptions, introducing ambiguity and reducing selection accuracy. LLMs also face strict input context limits, preventing efficient consideration of large toolsets. To address these challenges, we propose ToolScope, which includes: (1) ToolScopeMerger with Auto-Correction to automatically audit and fix tool merges, reducing redundancy, and (2) ToolScopeRetriever to rank and select only the most relevant tools for each query, compressing toolsets to fit within context limits without sacrificing accuracy. Evaluations on three state-of-the-art LLMs and three open-source tool-use benchmarks show gains of 8.38% to 38.6% in tool selection accuracy, demonstrating ToolScope's effectiveness in enhancing LLM tool use.

Generated automatically from available metadata and abstract on 2026-11-09.