|
107 | 107 | :id "mcp-tool-1" |
108 | 108 | :arguments {:message "hello from mcp"} |
109 | 109 | :manualApproval false}) |
110 | | - ;; toolCallRunning and progress may arrive in either order on Windows |
| 110 | + ;; toolCallRunning, progress, and toolCalled may arrive in any order on Windows |
111 | 111 | (match-contents-unordered |
112 | 112 | [chat-id "assistant" {:type "toolCallRunning" |
113 | 113 | :origin "mcp" |
114 | 114 | :name "echo" |
115 | 115 | :id "mcp-tool-1" |
116 | 116 | :arguments {:message "hello from mcp"}}] |
117 | | - [chat-id "system" {:type "progress" :state "running" :text "Calling tool"}]) |
118 | | - |
119 | | - ;; Tool called result — echo returns the same message |
120 | | - (match-content chat-id "assistant" {:type "toolCalled" |
121 | | - :origin "mcp" |
122 | | - :name "echo" |
123 | | - :id "mcp-tool-1" |
124 | | - :arguments {:message "hello from mcp"} |
125 | | - :error nil |
126 | | - :outputs [{:type "text" :text "hello from mcp"}]}) |
| 117 | + [chat-id "system" {:type "progress" :state "running" :text "Calling tool"}] |
| 118 | + [chat-id "assistant" {:type "toolCalled" |
| 119 | + :origin "mcp" |
| 120 | + :name "echo" |
| 121 | + :id "mcp-tool-1" |
| 122 | + :arguments {:message "hello from mcp"} |
| 123 | + :error nil |
| 124 | + :outputs [{:type "text" :text "hello from mcp"}]}]) |
127 | 125 |
|
128 | 126 | ;; Second LLM turn: final response after tool result |
129 | 127 | (match-content chat-id "assistant" {:type "text" :text "The echo tool returned: hello from mcp"}) |
|
239 | 237 | :id "mcp-add-tool-1" |
240 | 238 | :arguments {:name "multiply"} |
241 | 239 | :manualApproval false}) |
242 | | - ;; toolCallRunning and progress may arrive in either order on Windows |
| 240 | + ;; toolCallRunning, progress, and toolCalled may arrive in any order on Windows |
243 | 241 | (match-contents-unordered |
244 | 242 | [chat-id "assistant" {:type "toolCallRunning" |
245 | 243 | :origin "mcp" |
246 | 244 | :name "add-tool" |
247 | 245 | :id "mcp-add-tool-1" |
248 | 246 | :arguments {:name "multiply"}}] |
249 | | - [chat-id "system" {:type "progress" :state "running" :text "Calling tool"}]) |
250 | | - |
251 | | - ;; Tool result |
252 | | - (match-content chat-id "assistant" {:type "toolCalled" |
253 | | - :origin "mcp" |
254 | | - :name "add-tool" |
255 | | - :id "mcp-add-tool-1" |
256 | | - :arguments {:name "multiply"} |
257 | | - :error nil |
258 | | - :outputs [{:type "text" |
259 | | - :text "Tool 'multiply' registered successfully"}]}) |
| 247 | + [chat-id "system" {:type "progress" :state "running" :text "Calling tool"}] |
| 248 | + [chat-id "assistant" {:type "toolCalled" |
| 249 | + :origin "mcp" |
| 250 | + :name "add-tool" |
| 251 | + :id "mcp-add-tool-1" |
| 252 | + :arguments {:name "multiply"} |
| 253 | + :error nil |
| 254 | + :outputs [{:type "text" |
| 255 | + :text "Tool 'multiply' registered successfully"}]}]) |
260 | 256 |
|
261 | 257 | ;; Second LLM turn: final response |
262 | 258 | (match-content chat-id "assistant" {:type "text" :text "Tool added successfully"}) |
|
0 commit comments