Skip to content

version_set_operation

MCP 工具

version_set_operation

📖 描述

对两个版本集合执行集合运算:差集(difference)、交集(intersection)、并集(union)。

📥 参数

参数类型必填说明
operationstring✅ 是集合运算类型: difference
set_aarray✅ 是集合 A 的版本字符串数组
set_barray✅ 是集合 B 的版本字符串数组

🔌 调用示例

json
{
  "tool": "version_set_operation",
  "arguments": {
    "operation": "intersection",
    "set_a": [
      "1.0.0",
      "1.1.0",
      "2.0.0"
    ],
    "set_b": [
      "1.1.0",
      "2.0.0",
      "3.0.0"
    ]
  }
}

📤 返回示例

json
{
  "result_versions": [
    "1.1.0",
    "2.0.0"
  ]
}

📚 相关


源码

定义于 internal/mcp/tools.go,处理逻辑在 internal/mcp/handlers.go

基于 MIT 协议发布