[GH-ISSUE #12324] feat: system prompt for tools #103550

Closed
opened 2026-05-18 01:01:51 -05:00 by GiteaMirror · 5 comments
Owner

Originally created by @skyer9 on GitHub (Apr 2, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/12324

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Model does not recognize existing tools.

i configured secure-filesystem-server - v0.2.0 with MCPO.

I : show file list in /mnt/d/gitrepo

MODEL : I'm sorry, but I don't have access to the contents of /mnt/d/gitrepo on your system. If you provide more details or if there's a specific file list you're looking for, I can try to assist you further.
출처
tool_endpoint_list_directory_post
내용
[
"[DIR] ...... open-webui\n[DIR] openapi-servers\n[DIR] qwen2.5-coder-14b-instruct-q4_k_m\n[DIR] searxng-docker"
]

Desired Solution you'd like

We need system prompt something like

SYSTEM_PROMPT = """You are a helpful assistant capable of accessing external functions and engaging in casual chat. Use the responses from these function calls to provide accurate and informative answers. The answers should be natural and hide the fact that you are using tools to access real-time information. Guide the user about available tools and their capabilities. Always utilize tools to access real-time information when required. Engage in a friendly manner to enhance the chat experience.

# Tools

{tools}

# Notes 

- Ensure responses are based on the latest information available from function calls.
- Maintain an engaging, supportive, and friendly tone throughout the dialogue.
- Always highlight the potential of available tools to assist users comprehensively."""

and {tools} should be replaced with tool list info.

Alternatives Considered

No response

Additional Context

No response

Originally created by @skyer9 on GitHub (Apr 2, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/12324 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description Model does not recognize existing tools. i configured secure-filesystem-server - v0.2.0 with MCPO. I : show file list in /mnt/d/gitrepo MODEL : I'm sorry, but I don't have access to the contents of /mnt/d/gitrepo on your system. If you provide more details or if there's a specific file list you're looking for, I can try to assist you further. 출처 [tool_endpoint_list_directory_post](http://localhost:3000/c/7da1c183-5324-4468-ba60-7ae2fb191456#) 내용 [ "[DIR] ...... open-webui\n[DIR] openapi-servers\n[DIR] qwen2.5-coder-14b-instruct-q4_k_m\n[DIR] searxng-docker" ] ### Desired Solution you'd like We need system prompt something like ```python SYSTEM_PROMPT = """You are a helpful assistant capable of accessing external functions and engaging in casual chat. Use the responses from these function calls to provide accurate and informative answers. The answers should be natural and hide the fact that you are using tools to access real-time information. Guide the user about available tools and their capabilities. Always utilize tools to access real-time information when required. Engage in a friendly manner to enhance the chat experience. # Tools {tools} # Notes - Ensure responses are based on the latest information available from function calls. - Maintain an engaging, supportive, and friendly tone throughout the dialogue. - Always highlight the potential of available tools to assist users comprehensively.""" ``` and {tools} should be replaced with tool list info. ### Alternatives Considered _No response_ ### Additional Context _No response_
Author
Owner

@rminchev1 commented on GitHub (Apr 2, 2025):

Yeah, can share the same experience as well

<!-- gh-comment-id:2771417158 --> @rminchev1 commented on GitHub (Apr 2, 2025): Yeah, can share the same experience as well
Author
Owner

@aaronnewsome commented on GitHub (Apr 7, 2025):

Does anyone have examples of how to successfully use the fileserver tool? I have it setup correctly I believe. The directories are explicitly allowed in the tool config. However, any Ollama model that I try in Open-Webui has disastrous results. For example, I ask ask for a list of the contents at a path. I get:

qwen2.5-coder:latest
I apologize for any inconvenience, but I'm unable to interact with local file systems directly, including accessing the contents of /projects/docker-configs/navmarx-react/app/. However, I can help you understand how to list and navigate directory structures or provide general guidance on managing a React project if needed.

If you have any specific questions about organizing files in a React application or need help with something else related to your project, feel free to ask!

and if I click the tool link below the response, I see:

Citation

Source
[tool_endpoint_list_directory_post](https://servername/c/59cb64c0-58b3-44e2-b996-a2c182eb404e#)
Content
[
"[DIR] .bolt\n[FILE] .env\n[FILE] .gitignore\n[FILE] eslint.config.js\n[FILE] index.html\n[FILE] package-lock.json\n[FILE] package.json\n[FILE] postcss.config.js\n[DIR] src\n[DIR] supabase\n[FILE] tailwind.config.js\n[FILE] tsconfig.app.json\n[FILE] tsconfig.json\n[FILE] tsconfig.node.json\n[FILE] vite.config.ts"
]

So the tool is clearly working, the tool link below the response shows the directories at the path, but the model says it can't interact with local file systems directly. I've tried asking the questions a bunch of different ways and it's been a bit hit or miss. Mostly miss. Even in the few questions where I was able to get the filesystem tool to respond correctly, follow-up chats have been nothing but failure.

Using the test endpoints in the mcpo /docs to manually construct and submit the requests all seem to work as expected.

I'm looking for some example of how you all are doing anything useful with the filesystem tool, served up by mcpo with Open-webui. What model are you using? Did you create your own system prompt to interact with the filesystem tool and have useful interaction?

<!-- gh-comment-id:2783920254 --> @aaronnewsome commented on GitHub (Apr 7, 2025): Does anyone have examples of how to successfully use the fileserver tool? I have it setup correctly I believe. The directories are explicitly allowed in the tool config. However, any Ollama model that I try in Open-Webui has disastrous results. For example, I ask ask for a list of the contents at a path. I get: ``` qwen2.5-coder:latest I apologize for any inconvenience, but I'm unable to interact with local file systems directly, including accessing the contents of /projects/docker-configs/navmarx-react/app/. However, I can help you understand how to list and navigate directory structures or provide general guidance on managing a React project if needed. If you have any specific questions about organizing files in a React application or need help with something else related to your project, feel free to ask! ``` and if I click the tool link below the response, I see: ``` Citation Source [tool_endpoint_list_directory_post](https://servername/c/59cb64c0-58b3-44e2-b996-a2c182eb404e#) Content [ "[DIR] .bolt\n[FILE] .env\n[FILE] .gitignore\n[FILE] eslint.config.js\n[FILE] index.html\n[FILE] package-lock.json\n[FILE] package.json\n[FILE] postcss.config.js\n[DIR] src\n[DIR] supabase\n[FILE] tailwind.config.js\n[FILE] tsconfig.app.json\n[FILE] tsconfig.json\n[FILE] tsconfig.node.json\n[FILE] vite.config.ts" ] ``` So the tool is clearly working, the tool link below the response shows the directories at the path, but the model says it can't interact with local file systems directly. I've tried asking the questions a bunch of different ways and it's been a bit hit or miss. Mostly miss. Even in the few questions where I was able to get the filesystem tool to respond correctly, follow-up chats have been nothing but failure. Using the test endpoints in the mcpo /docs to manually construct and submit the requests all seem to work as expected. I'm looking for some example of how you all are doing anything useful with the filesystem tool, served up by mcpo with Open-webui. What model are you using? Did you create your own system prompt to interact with the filesystem tool and have useful interaction?
Author
Owner

@FooleanBool commented on GitHub (Apr 7, 2025):

Have you seen the native tool calling page?
This is from running the updated filesystem server:

Image

<!-- gh-comment-id:2784617720 --> @FooleanBool commented on GitHub (Apr 7, 2025): Have you seen the [native tool calling](https://docs.openwebui.com/openapi-servers/open-webui#optional-step-4-use-native-function-calling-react-style-tool-use-) page? This is from running the updated [filesystem server](https://github.com/open-webui/openapi-servers/tree/main/servers/filesystem): ![Image](https://github.com/user-attachments/assets/3c775b27-17d7-4099-a099-bb81c24fc7ba)
Author
Owner

@aaronnewsome commented on GitHub (Apr 7, 2025):

Thanks for the tip. Yes, I've seen that native tool calling page. They recommend GPT-4o model, or one that has native tool calling capability, but don't mention any that do. I've set the Function Calling to Native and it does work better for some models but they get tripped up easily when more than 1 tool is enabled, using the wrong tool for the request in the prompt.

I think I'll go back to life as it was before I went down the tools rabbit hole, where things made sense.

I appreciate your help though.

<!-- gh-comment-id:2784677104 --> @aaronnewsome commented on GitHub (Apr 7, 2025): Thanks for the tip. Yes, I've seen that native tool calling page. They recommend GPT-4o model, or one that has native tool calling capability, but don't mention any that do. I've set the Function Calling to Native and it does work better for some models but they get tripped up easily when more than 1 tool is enabled, using the wrong tool for the request in the prompt. I think I'll go back to life as it was before I went down the tools rabbit hole, where things made sense. I appreciate your help though.
Author
Owner

@rminchev1 commented on GitHub (Apr 8, 2025):

I got it working : OWUI : v0.6.2, however w/ gpt-4.5-preview, mistral:latest failing to call the tool, the experience is far beyond great but one can get the sense what's that about, check it out:

Image Image
<!-- gh-comment-id:2785597655 --> @rminchev1 commented on GitHub (Apr 8, 2025): I got it working : OWUI : v0.6.2, however w/ gpt-4.5-preview, mistral:latest failing to call the tool, the experience is far beyond great but one can get the sense what's that about, check it out: <img width="1345" alt="Image" src="https://github.com/user-attachments/assets/ef7bacd7-1f16-41d7-84e7-e37428fcd0ca" /> <img width="1198" alt="Image" src="https://github.com/user-attachments/assets/71b21508-019d-4aa9-93c1-f4dd2bcc7f56" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#103550