从文档到描述:面向MCP服务器描述的气味aware评估
From Docs to Descriptions: Smell-Aware Evaluation of MCP Server Descriptions
AI总结:
本文提出了一种针对MCP服务器描述气味的系统研究,揭示了描述质量对LLM工具选择的影响,并展示了气味引导修复的实用价值。
摘要:
模型上下文协议(MCP)已迅速成为通过可重用的MCP服务器将基于大语言模型(LLM)的代理与外部工具连接的事实标准。然而,在实践中,服务器选择和上架严重依赖于故意宽松约束的自由文本工具描述。尽管这种灵活性在很大程度上保证了MCP服务器的可扩展性,但也造成了一个可靠性缺口,即描述经常误表或遗漏关键语义,增加试错整合,降低代理行为,并可能引入安全风险。为此,我们提出了对MCP工具描述中气味及其对可用性影响的首次系统研究。具体而言,我们将软件/API文档实践和代理工具使用要求综合成一个四维质量标准:准确性、功能性、信息完整性以及简洁性,涵盖18种具体的气味类别。使用这一标准,我们在一个精心构建的包含10,831个MCP服务器的数据集上进行了大规模实证研究。我们发现,描述气味普遍存在(例如,73%的工具名称重复,数千个具有错误参数语义或缺失返回描述),反映了“代码优先,描述次之”的模式。通过受控突变研究,我们显示这些气味显著影响LLM工具选择,其中功能性和准确性影响最大(+11.6%和+8.8%,p < 0.001)。在功能等同的服务器竞争中,符合标准的描述达到72%的选择概率(比20%的基线高260%),证明了气味引导的修复具有显著的实用价值。我们发布了我们的标记数据集和标准,以支持未来关于可靠和安全MCP生态系统的研究。
英文摘要:
The Model Context Protocol (MCP) has rapidly become a de facto standard for connecting LLM-based agents with external tools via reusable MCP servers. In practice, however, server selection and onboarding rely heavily on free-text tool descriptions that are intentionally loosely constrained. Although this flexibility largely ensures the scalability of MCP servers, it also creates a reliability gap that descriptions often misrepresent or omit key semantics, increasing trial-and-error integration, degrading agent behavior, and potentially introducing security risks. To this end, we present the first systematic study of description smells in MCP tool descriptions and their impact on usability. Specifically, we synthesize software/API documentation practices and agentic tool-use requirements into a four-dimensional quality standard: accuracy, functionality, information completeness, and conciseness, covering 18 specific smell categories. Using this standard, we conducted a large-scale empirical study on a well-constructed dataset of 10,831 MCP servers. We find that description smells are pervasive (e.g., 73% repeated tool names, thousands with incorrect parameter semantics or missing return descriptions), reflecting a "code-first, description-last" pattern. Through a controlled mutation-based study, we show these smells significantly affect LLM tool selection, with functionality and accuracy having the largest effects (+11.6% and +8.8%, p < 0.001). In competitive settings with functionally equivalent servers, standard-compliant descriptions reach 72% selection probability (260% over a 20% baseline), demonstrating that smell-guided remediation yields substantial practical benefits. We release our labeled dataset and standards to support future work on reliable and secure MCP ecosystems.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。