[GH-ISSUE #16881] feat: Can i use custom tools to retrieve users’ chat messages. #18082

Closed
opened 2026-04-20 00:01:05 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @Oscarjia on GitHub (Aug 25, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16881

Check Existing Issues

  • 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:

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

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_
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#18082