Skip to content

Commit aaa0d61

Browse files
committed
Fix ollama tool calls
1 parent e400ba8 commit aaa0d61

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- Fix ollama tool calls.
6+
57
## 0.12.6
68

79
- fix web-search support for custom providers.

src/eca/features/tools.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@
4949

5050
(defn call-tool! [^String name ^Map arguments db config]
5151
(logger/info logger-tag (format "Calling tool '%s' with args '%s'" name arguments))
52-
(if-let [native-tool-handler (get-in (native-definitions db config) [name :handler])]
53-
(native-tool-handler arguments {:db db :config config})
54-
(f.mcp/call-tool! name arguments db)))
52+
(let [arguments (update-keys arguments clojure.core/name)]
53+
(if-let [native-tool-handler (get-in (native-definitions db config) [name :handler])]
54+
(native-tool-handler arguments {:db db :config config})
55+
(f.mcp/call-tool! name arguments db))))
5556

5657
(defn init-servers! [db* messenger config]
5758
(let [disabled-tools (set (get-in config [:disabledTools] []))

0 commit comments

Comments
 (0)