瀏覽代碼

fix(mcp): McpToolRegistry toolSchema 参数 name 缺失导致 properties 为空 [skip ci]

Xiaogang Liao 3 天之前
父節點
當前提交
1817db7570
共有 1 個文件被更改,包括 2 次插入 和 0 次删除
  1. 2 0
      cfc-backend/src/main/java/com/etotem/cfc/controller/mcp/McpToolRegistry.java

+ 2 - 0
cfc-backend/src/main/java/com/etotem/cfc/controller/mcp/McpToolRegistry.java

@@ -421,6 +421,7 @@ public class McpToolRegistry {
 
     private static Map<String, Object> required(String name, String type, String description) {
         Map<String, Object> p = new LinkedHashMap<>();
+        p.put("name", name);
         p.put("type", type);
         p.put("description", description);
         return p;
@@ -428,6 +429,7 @@ public class McpToolRegistry {
 
     private static Map<String, Object> optional(String name, String type, String description) {
         Map<String, Object> p = new LinkedHashMap<>();
+        p.put("name", name);
         p.put("type", type);
         p.put("description", description);
         return p;