mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[GH-ISSUE #13125] issue:MCP tool call error #32346
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @chelseaztq on GitHub (Apr 22, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13125
Check Existing Issues
Installation Method
Git Clone
Open WebUI Version
0.6.5
Ollama Version (if applicable)
No response
Operating System
Ubuntu 22.04
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
I am using the MCP server service of openwebui,the tool call cannot be performed normally without using the native mode,But when I use the native mode, I found that the arguments parameter is not parsed correctly during the streaming output parsing.
[](
852d9dcbe9/backend/open_webui/utils/middleware.py (L1689))The specific reason is that the "current_response_tool_call" does not have the "arguments" key value, I'm not sure if it's a problem with the vllm inference framework I'm using, in any case, there are no "arguments" here, and the version of the vllm inference framework I'm using is 0.8.4.
So, this led to the situation where delta_arguments was not correctly added to the arguments when assigning here.
This also indirectly leads to errors when calling specific tools later.
852d9dcbe9/backend/open_webui/utils/tools.py (L563)Because here parms is actually an empty {}, it evaluates to false, and the code will directly jump to raise Exception
Actual Behavior
Refer to the above
Steps to Reproduce
So I made some repairs, but I feel it's not a fundamental solution to the problem.
Firstly, check if there are arguments in the dict. If not, create this key and assign the default value ""
Secondly, because my mcp tool may not pass any parameters to the arguments here, the parsing may result in an empty {}, but when the if parms is performing a boolean value judgment, it is false.
So I also made the following corrections
Finally, my MCP tool was successfully called
But regarding the modification of the second step, this is just a temporary solution. If you think my fix is okay, I will submit a PR later
I am not sure whether it is because my system prompt caused the current_response_tool_call not to include the arguments key-value pair, or it is caused by the vllm framework, but this is indeed a relatively serious problem, which directly led to the mcp not being usable.
And I also referred to the template of cherry studio's tool call, and I found that they wrote it very detailed, as follows
Cherry Studio's MCP service is very stable, I'm not sure if they have adopted the native mode, you can refer to it
Logs & Screenshots
Additional Information
No response
@rgaricano commented on GitHub (Apr 22, 2025):
are you using dev branch of mcpo?
(on dev branch there are some commits that fix schema errors, https://github.com/open-webui/mcpo/tree/dev )
@Kun-Zhang-x commented on GitHub (May 9, 2025):
这个问题我也遇到了,奇怪的是我如果使用阿里百炼上的Qwen3模型就是正常的,但是使用本地vllm0.8.5部署的Qwen3模型就会出现这个问题