I have searched the existing issues and discussions.
Problem Description
Hi everyone,
I’m wondering if it’s possible to use custom tools to retrieve users’ chat messages. For example, I’m thinking of something like this:
classTools:defget_all_messages(self,messages:dict=Field(...,description="Get user's chat messages for more context")):...
Is this approach supported, or is there a recommended way to access user messages programmatically?
Thanks in advance!
Desired Solution you'd like
I’m trying to access the content of the current question in my tool. For example, I want to get the text of the question/answer a user just asked.
Alternatives Considered
No response
Additional Context
No response
Originally created by @Oscarjia on GitHub (Aug 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16881
### Check Existing Issues
- [x] I have searched the existing issues and discussions.
### Problem Description
Hi everyone,
I’m wondering if it’s possible to use custom tools to retrieve users’ chat messages. For example, I’m thinking of something like this:
```python
class Tools:
def get_all_messages(self, messages: dict = Field(..., description="Get user's chat messages for more context")):
...
```
Is this approach supported, or is there a recommended way to access user messages programmatically?
Thanks in advance!
### Desired Solution you'd like
I’m trying to access the content of the current question in my tool. For example, I want to get the text of the question/answer a user just asked.
### Alternatives Considered
_No response_
### Additional Context
_No response_
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @Oscarjia on GitHub (Aug 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16881
Check Existing Issues
Problem Description
Hi everyone,
I’m wondering if it’s possible to use custom tools to retrieve users’ chat messages. For example, I’m thinking of something like this:
Is this approach supported, or is there a recommended way to access user messages programmatically?
Thanks in advance!
Desired Solution you'd like
I’m trying to access the content of the current question in my tool. For example, I want to get the text of the question/answer a user just asked.
Alternatives Considered
No response
Additional Context
No response