arXiv:2603.24747cs.AIcs.MA2026-03被引 1

首次用形式化方法证明工具协议的等价性,为智能体系统安全提供理论基础。

Formal Semantics for Agentic Tool Protocols: A Process Calculus Approach

  • 用过程演算建模SGD与MCP协议,建立其结构对等关系
  • 发现MCP存在表达力缺失,反向映射为部分且有损
  • 提出MCP+增强版,实现与SGD完全行为等价

大语言模型智能体调用外部工具的兴起,迫切需要对代理协议进行形式化验证。当前主流范式包括用于零样本API泛化的模式引导对话(SGD)和业界标准的模型上下文协议(MCP)。二者均通过模式描述实现动态服务发现,但其形式关系尚未被研究。本文首次对SGD与MCP进行过程演算形式化,证明二者在明确定义的映射Phi下结构对偶。我们揭示反向映射Phi⁻¹为部分且有损,暴露出MCP在表达力上的关键缺陷。通过双向分析,识别出四个必要且充分条件:语义完备性、显式动作边界、失败模式文档化、工具间关系声明。将这些原则形式化为MCP+类型系统扩展,证明MCP+与SGD完全等价。本工作建立了首个可验证智能体系统的形式基础,并将模式质量确立为可证明的安全属性。实际意义在于,当前MCP规范相比SGD存在表达力差距,需引入所提扩展以提升可靠性。

原文摘要 · Abstract (English)

The emergence of large language model agents capable of invoking external tools has created urgent need for formal verification of agent protocols. Two paradigms dominate this space: Schema-Guided Dialogue (SGD), a research framework for zero-shot API generalization, and the Model Context Protocol (MCP), an industry standard for agent-tool integration. While both enable dynamic service discovery through schema descriptions, their formal relationship remains unexplored. We present the first process calculus formalization of SGD and MCP, proving they are structurally bisimilar under a well-defined mapping Phi. We demonstrate that the reverse mapping Phi-1 is partial and lossy, revealing critical gaps in MCP's expressivity. Through bidirectional analysis, we identify four principles - semantic completeness, explicit action boundaries, failure mode documentation, and inter-tool relationship declaration -- as necessary and sufficient conditions for full behavioral equivalence. We formalize these principles as type-system extensions MCP+, proving MCP+ is fully equivalent to SGD. Our work provides the first formal foundation for verified agent systems and establishes schema quality as a provable safety property. Practically, this means that the current MCP specification has expressiveness gaps compared to SGD and would benefit from the proposed extensions.

智能体协议形式化验证过程演算MCP

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