mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-24 03:18:21 -05:00
[GH-ISSUE #19740] issue: How to pass a file or a file URL when invoking MCP? #18978
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 @gongshaojie12 on GitHub (Dec 4, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/19740
Check Existing Issues
Installation Method
Pip Install
Open WebUI Version
0.6.41
Ollama Version (if applicable)
No response
Operating System
centos7
Browser (if applicable)
No response
Confirmation
README.md.Expected Behavior
I created an agent in Dify that requires a file or a file URL as a parameter. After configuring this agent as an MCP tool in Open-WebUI, how can I pass a file or a file URL to the Dify agent when invoking it in Open-WebUI?
I expect to be able to pass a file or a file URL to the Dify agent in Open-WebUI.
Actual Behavior
It is not possible to pass a file or a file URL to the Dify MCP from Open-WebUI.
Steps to Reproduce
None
Logs & Screenshots
None
Additional Information
No response
@owui-terminator[bot] commented on GitHub (Dec 4, 2025):
🔍 Similar Issues Found
I found some existing issues that might be related to this one. Please check if any of these are duplicates or contain helpful solutions:
#19701 issue: knowledge can not multiple upload file
by willy808 • Dec 03, 2025 •
bug#14726 issue: When the LLM calls mcp tools that return image data, the front UI can not display the image
by tangzhong1 • Jun 06, 2025 •
bug#18981 issue: 0.6.35 error using tools through mcpo
by GlisseManTV • Nov 06, 2025 •
bug#16521 issue: web browser directory access mcpo openapi server
by okamototk • Aug 12, 2025 •
bug#19563 issue:
by naruto7g • Nov 28, 2025 •
bugShow 5 more related issues
#17808 issue: unexpected MCP tool response handling
by dlamoris • Sep 27, 2025 •
bug#15855 issue:
by richtong • Jul 19, 2025 •
bug#14767 issue:
by TheMoye • Jun 07, 2025 •
bug#13451 issue:
by kinnerful • May 03, 2025 •
bug#18041 issue: web search enabled and fetch MCP break rule 2 tools for the same function
by gattytto • Oct 04, 2025 •
bug💡 Tips:
This comment was generated automatically by a bot. Please react with a 👍 if this comment was helpful, or a 👎 if it was not.
@gongshaojie12 commented on GitHub (Dec 4, 2025):
The issues you mentioned are different from mine.
@rgaricano commented on GitHub (Dec 4, 2025):
You can attach it to chat, then it is going to be passed to MCP tools via the
__files__inextra_params.e.g. for extract it:
Note:
If you cannot see the file list, try extracting them directly from
__files__instead of throughkwargs:async def your_mcp_tool_function(__files__: Optional[dict] = None, **kwargs):files = __files__ if __files__ is not None else {}@gongshaojie12 commented on GitHub (Dec 4, 2025):
Where should this code be placed? My MCP is configured like this, as shown below: