Describe the bug
I connected cagent with MCP servers using the Docker MCP Gateway, when I type: "find snippet about error handling in rust", the tool call of search_snippet is triggered but the the parameter(s)/arguments(s) of the tool call not parsed/extracted
Version affected
cagent version v1.0.3
Build time: 2025-09-03T17:52:32Z
Commit: 0bf08b30b07080f82b0ab589fb1ed87f00ba6dfc
How To Reproduce
Or follow this video:
https://github.com/user-attachments/assets/05c08562-a981-4abd-bc93-ade964a56e29
Expectation
An extraction of the arguments that works
Screenshots
OS and Terminal type
macOS Sequoia 15.5 + iTerm2 + VScode terminal
Additional context
When the MCP Gateway and the MCP servers are started, for checking, you can:
You can test if the loaded model can detect the tool calls with the appropriate arguments with this go source code: https://github.com/micro-agent/bob/blob/main/tools-loop-demo/main.go
- I use
github.com/mark3labs/mcp-go v0.39.1
- I use
dmr as provider an this model hf.co/menlo/jan-nano-gguf:q4_k_m
- I tried with
ai/qwen2.5:latest too, same issue
Expected results after execution:
User message:
userQuestion := openai.UserMessage(`
Find rust snippet about error handling.
Find go snippet about structure.
`)
Answer (extract):
Tool: search_snippet - Find one or more snippets related to the topic. - {map[] object map[topic:map[description:Search topic or question to find relevant snippets. type:string]] [topic]}
...
▶️ Executing function: search_snippet with args: {"topic":"rust error handling"}
...
▶️ Executing function: search_snippet with args: {"topic":"go structure"}
...
Describe the bug
I connected cagent with MCP servers using the Docker MCP Gateway, when I type: "find snippet about error handling in rust", the tool call of
search_snippetis triggered but the the parameter(s)/arguments(s) of the tool call not parsed/extractedVersion affected
How To Reproduce
docker compose up --build(compose file:https://github.com/micro-agent/bob/blob/main/compose.yml)cagent run bob.yaml(https://github.com/micro-agent/bob/blob/main/bob.yaml)Or follow this video:
https://github.com/user-attachments/assets/05c08562-a981-4abd-bc93-ade964a56e29
Expectation
An extraction of the arguments that works
Screenshots
OS and Terminal type
macOS Sequoia 15.5 + iTerm2 + VScode terminal
Additional context
When the MCP Gateway and the MCP servers are started, for checking, you can:
search_snippetwith this arguments{"topic": "find snippet for defining struct in rust"}: https://github.com/micro-agent/bob/blob/main/tests/scripts/tool.call.shYou can test if the loaded model can detect the tool calls with the appropriate arguments with this go source code: https://github.com/micro-agent/bob/blob/main/tools-loop-demo/main.go
Expected results after execution:
User message:
Answer (extract):
Tool: search_snippet - Find one or more snippets related to the topic. - {map[] object map[topic:map[description:Search topic or question to find relevant snippets. type:string]] [topic]} ... ▶️ Executing function: search_snippet with args: {"topic":"rust error handling"} ... ▶️ Executing function: search_snippet with args: {"topic":"go structure"} ...