mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #17808] issue: unexpected MCP tool response handling #57068
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 @dlamoris on GitHub (Sep 27, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17808
Check Existing Issues
Installation Method
Docker
Open WebUI Version
v0.6.31
Ollama Version (if applicable)
No response
Operating System
macOS Sonoma
Browser (if applicable)
Chrome
Confirmation
README.md.Expected Behavior
With 0.6.31, I'm trying out direct mcp connection where I had mcpo openapi connection before, using the same mcp server, with native function calling, using aws nova or claude 3.7 model.
Mcpo calling works, but direct mcp connection doesn't. I think I've traced it down to how the mcp result is handled compared to how mcpo handles it, and possibly the non openai model interprets it (or fail to).
Mcpo is unwrapping the mcp response and sending only the text/image value (see https://github.com/open-webui/mcpo/blob/main/src/mcpo/utils/main.py#L38) but mcp support is returning the entire 'content' array (https://github.com/open-webui/open-webui/blob/v0.6.31/backend/open_webui/utils/mcp/client.py#L69).
I'm not sure if this was the intended behavior, but it makes switching from mcpo to just mcp impossible for me as the models aren't returning anything with this result.
Actual Behavior
model returns nothing using mcp calling
Steps to Reproduce
Logs & Screenshots
Log for mcpo call:
Log for mcp call:
Additional Information
No response
@dlamoris commented on GitHub (Sep 27, 2025):
After debugging more, it was actually because my mcp function names had spaces in them, and that was tripping up litellm. Fixing the function names fixed the issue.
Still, the difference in response handling from mcpo is probably worth looking at, especially if the content returned is not text, and the content array doesn't include potential structured content (https://modelcontextprotocol.io/specification/2025-06-18/server/tools#structured-content)
@tjbck commented on GitHub (Sep 29, 2025):
Addressed in dev.