From f2eac1284ab767f2c6200dc86fc9a75cbc026967 Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 21 Aug 2025 21:47:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0iOS=E7=9A=84mcp=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E8=BF=87=E6=BB=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chat_api/ios/chat_api/Sources/chat_api/MCPClient.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local_plugins/chat_api/ios/chat_api/Sources/chat_api/MCPClient.swift b/local_plugins/chat_api/ios/chat_api/Sources/chat_api/MCPClient.swift index 85bcc05e6..5f4ad0f10 100644 --- a/local_plugins/chat_api/ios/chat_api/Sources/chat_api/MCPClient.swift +++ b/local_plugins/chat_api/ios/chat_api/Sources/chat_api/MCPClient.swift @@ -114,7 +114,7 @@ public class MCPSubClient { } private func processTools(_ toolList: [Tool]) { - tools = toolList + tools.removeAll() toolMaps.removeAll() for tool in toolList { @@ -128,7 +128,7 @@ public class MCPSubClient { "description": tool.description ?? "", "parameters": parameters ] - + tools.append(tool) toolMaps.append([ "type": "function", "function": functionMap