arXiv:2505.06416cs.CL2025-05被引 41

让大模型自动发现并同步工具,解决动态调用难题。

ScaleMCP: Dynamic and Auto-Synchronizing Model Context Protocol Tools for LLM Agents

  • 构建动态工具检索器与自动同步存储系统,以MCP服务器为唯一真相源。
  • 在5000个金融指标工具上测试,显著提升工具调用准确率和响应效率。
  • 适合需要频繁调用外部工具的智能体开发人员使用。

大型语言模型(LLM)与模型上下文协议(MCP)的发展,使智能体能够动态调用外部工具和API。然而,现有工具选择框架未集成MCP服务器,依赖易出错的手动更新本地工具仓库,导致重复、不一致和低效。同时,当前方法在调用前就抽象工具选择,限制了智能体自主性,并阻碍多轮交互中的动态重查询。为此,我们提出ScaleMCP,一种新型工具选择方法:动态为LLM智能体配备MCP工具检索器,使其可自主将工具加入记忆;并通过与MCP服务器的增删改查(CRUD)操作实现自动同步的工具存储流水线。我们还提出一种新嵌入策略Tool Document Weighted Average(TDWA),在嵌入过程中有侧重地强调工具文档的关键部分(如工具名或合成问题)。在自建的5000个金融指标MCP服务器数据集上,对10种LLM模型、5种嵌入模型和5种检索器类型进行综合评估,结果表明工具检索与智能体调用性能显著提升,验证了ScaleMCP在可扩展、动态工具选择与调用方面的有效性。

原文摘要 · Abstract (English)

Recent advancements in Large Language Models (LLMs) and the introduction of the Model Context Protocol (MCP) have significantly expanded LLM agents' capability to interact dynamically with external tools and APIs. However, existing tool selection frameworks do not integrate MCP servers, instead relying heavily on error-prone manual updates to monolithic local tool repositories, leading to duplication, inconsistencies, and inefficiencies. Additionally, current approaches abstract tool selection before the LLM agent is invoked, limiting its autonomy and hindering dynamic re-querying capabilities during multi-turn interactions. To address these issues, we introduce ScaleMCP, a novel tool selection approach that dynamically equips LLM agents with a MCP tool retriever, giving agents the autonomy to add tools into their memory, as well as an auto-synchronizing tool storage system pipeline through CRUD (create, read, update, delete) operations with MCP servers as the single source of truth. We also propose a novel embedding strategy, Tool Document Weighted Average (TDWA), designed to selectively emphasize critical components of tool documents (e.g. tool name or synthetic questions) during the embedding process. Comprehensive evaluations conducted on a created dataset of 5,000 financial metric MCP servers, across 10 LLM models, 5 embedding models, and 5 retriever types, demonstrate substantial improvements in tool retrieval and agent invocation performance, emphasizing ScaleMCP's effectiveness in scalable, dynamic tool selection and invocation.

大模型智能体工具调用动态同步MCP

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。