issue: MCP tool call parsed, but sometimes not executed #16278
Replies: 29 comments 12 replies
|
could you provide backend log? ( |
|
Hi @rgaricano, thanks for taking a look at this. I had already attached the backend logs, directly above the screenshots: open-webui-success.log and open-webui-fail.log. Or do you need anything else? I am using Native Function Calling. |
|
Ok, I can't see any relevant thing in logs, That servers use search functions, but for other task: search for teams, project, users,... of linear. As model is setted as Native tool usage, I think that the model allways choose this mcp for do a search. |
|
The model selects the correct function, as shown in the screenshots, consistently attempting to execute So I wonder why the frontend (it's a direct tool call, as far as I know) isn't trying to send anything to mcpo. I've seen similar behavior now that I added the Home Assistant MCP server as well, so it's not just searching that's affected. |
|
It show |
|
That's weird if it's showing a different tool than the one it requests. Where in the logs did you see it requesting linear instead of searxng? I'd like to troubleshoot this further, but either it's not logging enough or I just can't find it? |
|
Sorry Wolfram, the searxng search seem that it's done but with a empty text query, and don't return any results, if this a result of a bad working of linear? is due a incorrect call from model? an error in one tool that block other tools |
|
Yes, it is The queries that failed weren't empty, I expanded the Executing boxes and saw the JSON. It's also in the logs: The difference between the failed and successful queries is that in the success-log, each "Parsed args" line by open-webui is followed by a line from mcpo like this: This line is missing from the fail-log, indicating that the tool call never left the browser or at least didn't reach mcpo. Unfortunately I can't find any more information in the logs, to figure out what exactly is going wrong there. |
|
I'll do test with mcp-searxng and other tools to try to trace & find the issue, I will inform you with whatever. |
|
Thanks! Here's my complete mcpo configuration for your reference:
{
"mcpServers": {
"time": {
"command": "uvx",
"args": ["mcp-server-time"]
},
"searxng": {
"command": "npx",
"args": ["-y", "mcp-searxng"],
"env": {
"SEARXNG_URL": "http://host.docker.internal:8888"
}
},
"firecrawl": {
"command": "npx",
"args": ["-y", "firecrawl-mcp"],
"env": {
"FIRECRAWL_API_URL": "http://host.docker.internal:3002"
}
},
"home-assistant":{
"command": "uvx",
"args": ["mcp-proxy"],
"env": {
"SSE_URL": "https://homeassistant/mcp_server/sse",
"API_ACCESS_TOKEN": "…"
}
},
"linear": {
"command": "bash",
"args": ["-c", "npm install --no-save undici@latest >/dev/null 2>&1 && NODE_OPTIONS=--import=/app/heartbeat-patch.mjs npx mcp-remote https://mcp.linear.app/sse 3334 --transport sse-only"]
},
"notion": {
"command": "bash",
"args": ["-c", "npm install --no-save undici@latest >/dev/null 2>&1 && NODE_OPTIONS=--import=/app/heartbeat-patch.mjs npx mcp-remote https://mcp.notion.com/sse 3334 --transport sse-only"]
}
}
}The bash commands for the SSE servers resolve an issue in mcp-remote that causes SSE timeouts. However, this is unrelated to the current issue, as I have experienced it before and independently of the timeouts. And here's my tools configuration inside Open WebUI:
|
|
It took me a while, but I got it installed: time, searxng (locally, without Docker), linear, and notion. I tested it searching for news with searxng, and it worked with and without linear enabled. I've only had a similar issue with the default tool setting (not native), but it asked me to be more specific with the search. I changed it to search for the latest news with searxng, and it performed the search without any issues. |
|
Thank you, I appreciate it! I hope you can uncover what's happening. I'd dive deeper into the investigation myself if I knew where to find more debugging information, such as when and how the function calls are executed and how requests are sent to mcpo. Even in Debug logging mode, I don't see enough information to effectively track this. |
|
I used a config.json a little more reduced (I’m not using docker), and for avoid some issues: |
|
Ah, I see you're using the server-side MCPs. I'm using the client-side direct tool calls. Could that make a difference? The main reason I'm not using server-side MCPs (in my single user setup) is that I'd have to toggle MCPs on every time I start a new chat, and the reason I'm using MCPs is to let the AI make the decision when and which tools to use. If only it saved the state of the tool toggles, then that could be an ideal solution. |
|
yes, it make difference, client side does the call throught ajax, then the ips have to be public accesible, but I don't think that it's relevant in this case (all ips are accessible for your browser), anyway I'll to test with direct connection too (setting the mcpo in the client...) And No, I haven't to toggle its in every chat, I have it setted in the model and its appear as activated since first moment. |
|
Tested with direct connections, running mcpo in client. |
How did you achieve this? I can't add models in the Admin Panel, apparently because I don't use Ollama. However, I successfully added the model in the User Workspace based on an existing OpenRouter model and even selected the tools. Yet, for some reason, I can't select the model to use it: It's neither clickable in the Workspace nor visible in the model dropdown list, even though it's set for public visibility. Getting this to work would actually be preferable to user-defined tools, as it makes tool use more configurable and flexible. |
|
don't you see models in adminSettings/models? If you don't see models from workspace, check user permissions (admin/settings - groups or defaults) |
|
I've figured it out: I added a direct OpenRouter connection as my user, which is why the user models weren't visible in the admin panel. After adding the connection there, all the models appeared, allowing me to assign the tools. This solution is actually much better than using user-defined tools! Although we deviated from the original issue, this approach is superior, so thank you for bringing it to my attention. I'll test this new setup further to see if it also resolves the tool call issues... |
|
We are facing the same issue. GPT 4.1 and 4o models are able to identify the correct tool function to call but OpenWebUI never makes the call to localhost (direct tools) regardless of the function calling setting. Direct tools connection testing works though. A bit about the infra:
Config file:
|
|
Same issue here, manage to identify the correct tool, openwebui shows executing tool ... and the mcpo server never gets a response, sometimes clicking the "regen" button fixes the issue and the tool is called, others it just spins on executing tool and no request is ever fired. |
|
Hi @tjbck and @rgaricano, just for your note for function calling API implementatoin which causes MCP tool call parased but sometimes not executed. This error does not occur every time. Occasionally, the content field is missing in a tool message when using the OpenAI-compatible function calling API (I’m running this through LiteLLM as the wrapper). When that happens, the API returns the following error:
For example, missing 'content' parameter on the response output: ❌ Example (invalid, causes your error): ✅ Example (valid): From what I can see, even though the rest of the API endpoint calls are executed correctly, the missing
|
|
Hi @rgaricano , I believe so because I haven't faced that similar problem anymore after the upgrade to v0.6.26 at the time being... |
|
To @rgaricano , However, another issue occurs: after a tool call, the tool call execution might be skipped (as shown in the screenshot below). I believe this also happened in earlier versions, but at that time I wasn’t able to figure out the reason behind it.
After some checking, I found this error:
This probably mean the tool call execution are not performing properly in some cases (for example, timeout, etc). I try to catch why the tool calls execution are sometimes skipped from |
|
After checking the error logs via Not sure if I were correct, please feel free to comment. Below is my logs: UPDATED x1: I found that this happens because my system prompt specifies: As a result, Gemini keeps adding
At the end, I found it's the function calling capability of the LLM model which could potentially result to this case. UPDATED x2: Weird, in one of my trial, openai
|




























Uh oh!
There was an error while loading. Please reload this page.
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.18
Ollama Version (if applicable)
No response
Operating System
macOS Sequoia
Browser (if applicable)
Chrome 138.0.7204.158
Confirmation
README.md.Expected Behavior
I've successfully connected several MCP servers to Open WebUI via mcpo. When the model performs a tool call, the tool executes correctly.
Actual Behavior
When I enable three MCPs (which can vary), and the model attempts a web search (or likely any other tool call, though web search is the easiest to reproduce), the tool call is parsed successfully, as shown in the logs. However, the execution doesn't occur. There's no outgoing request to mcpo; instead, the tool call immediately returns an empty response, while the Executing... symbol continues to spin, even after the response has finished.
Steps to Reproduce
The latest Open WebUI, freshly pulled from
ghcr.io/open-webui/open-webui:main, is running locally in a Docker container on my Mac.mcpo(freshly pulled fromghcr.io/open-webui/mcpo:main) is also running in a Docker container as part of the same Compose file and provides several MCP tool servers:mcp-server-time,mcp-searxng, andlinearviamcp-remote.When I enable only
mcp-server-timeandmcp-searxng, the web search functions correctly, and the tool is called properly. However, once I also enablelinear, the web search tool stops being called.I can replicate this issue with other MCP servers, such as using
firecrawlinstead ofmcp-searxngandnotioninstead oflinear, indicating that it's not specific to any particular MCP server but rather a more general problem.Logs & Screenshots
When it works: open-webui-success.log
When it fails: open-webui-fail.log
The Executing... symbol keeps spinning even after the response is complete. The network tab shows no connections to the mcpo server.
Additional Information
This is a significant obstacle for me right now because I rely on these tools. I'm ready to provide any additional information you need, as I can consistently reproduce the issue.
All reactions