We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c60acb commit 57111f1Copy full SHA for 57111f1
2 files changed
CHANGELOG.md
@@ -2,6 +2,8 @@
2
3
## Unreleased
4
5
+- Avoid errors on multiple same MCP server calls in parallel.
6
+
7
## 0.54.2
8
9
- Fix openai cache tokens cost calculation.
src/eca/features/tools/mcp.clj
@@ -224,8 +224,10 @@
224
(when (some #(= name (:name %)) tools)
225
client)))
226
first)
227
- result (.callTool ^McpSyncClient mcp-client
228
- (McpSchema$CallToolRequest. name arguments))]
+ ;; Synchronize on the client to prevent concurrent tool calls to the same MCP server
+ result (locking mcp-client
229
+ (.callTool ^McpSyncClient mcp-client
230
+ (McpSchema$CallToolRequest. name arguments)))]
231
{:error (.isError result)
232
:contents (mapv ->content (.content result))}))
233
0 commit comments