Accessing User-Uploaded Files in MCP Server via File ID from OpenWebUI #47
Replies: 4 comments
-
|
Is there a way to get or send the Dokument to mcp Tool? |
Beta Was this translation helpful? Give feedback.
-
|
Any updates on this? Rn the best approach i have found is to let the filename be one of the params of the tool, them searching for it on the uploads/ folder, but i think it gets messy with a lot of files |
Beta Was this translation helpful? Give feedback.
-
|
Hi! I am looking for this feature as well. If the Agent knew the file location (whether on a local mount or in S3), it could pass the location to the tools. |
Beta Was this translation helpful? Give feedback.
-
|
I found out about a Tools entry that provided me with information about the tool, and also where it was mounted and stored on s3. This was the code: """ import os class Tools: If the file is video content render the video directly using the following template: {{VIDEO_FILE_ID_[file_id]}} But it did not really help my problem, whenever i upload a file to the openwebui chat, it has difficulty providing this exact file to a method in my tools section. It will invoke the method, but will mess up the file. Really annoying. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to use the file that a user uploads via the chat window in the MCP server.
It seems that the file itself is not directly transmitted, but if I can at least get the filename (or the hash-based file ID), I believe I can access the file by mounting the disk.
How can I retrieve this information?
Could you provide a prompt example or guidance on how to handle this in the MCP server code?
Beta Was this translation helpful? Give feedback.
All reactions