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