[GH-ISSUE #20892] feat: Support tool events for external tools (OpenAPI/MCP) #19324

Closed
opened 2026-04-20 01:44:13 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @reuschling on GitHub (Jan 23, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20892

Check Existing Issues

  • I have searched for all existing open AND closed issues and discussions for similar requests. I have found none that is comparable to my request.

Verify Feature Scope

  • I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions.

Problem Description

I asked for clarification inside the documentation whether tool events are supported in python implemented tools only. Nicely the documentation now clearly says that events are not supported with OpenAPI and MCP based tools.

This is the according feature request. It would be very good if we could have the same nice functionalities inside external tools also.

Desired Solution you'd like

Here are some thoughts about how this could be implemented.

  • As there is not the same availability of the two according (python) functions event_emitter and event_call, there must be some other possibility for the tool server to call these. As the communication is done via REST calls, the tool server could call some defined OpenWebUI REST endpoints.
  • As the tool server implementation is state-less, the external tool must be able to identify the chat window which is the target of the event. Then, the tool server must send some chat window identifier together with the event call.
  • As OpenWebUI always initiates the communication with the tool server, there is the possibility to send some chat window identifier together with the tool call request. A special 'init' or 'send me some metadata' tool endpoint is not necessary.
  • For security, the chat window identifier should be thought as some secret token, not as a simple increasing integer value. This prevents that a tool server could emit or call events inside chat windows which it should not have access to.

Thus my suggestion:

  • When OpenWebUI calls a tool server, it always sends some chat window identifier together with the request. This could be done nicely, without breaking changes as entry inside the HTTP header (e.g. chat_id). Sending this metadata inside the request body would need changes of the OpenAPI and MCP interfaces.
  • The OpenWebUI server offers two REST calls for event_emitter and event_call. These calls offer the exact same functionality as the python functions (they just call them under the hood), but need the chat window identifier as additional parameter.
  • The tool server can call these REST endpoints to emit or call events inside the right chat window now.

Alternatives Considered

No response

Additional Context

No response

Originally created by @reuschling on GitHub (Jan 23, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/20892 ### Check Existing Issues - [x] I have searched for all existing **open AND closed** issues and discussions for similar requests. I have found none that is comparable to my request. ### Verify Feature Scope - [x] I have read through and understood the scope definition for feature requests in the Issues section. I believe my feature request meets the definition and belongs in the Issues section instead of the Discussions. ### Problem Description I [asked for clarification](https://github.com/open-webui/docs/issues/1022) inside the documentation whether tool events are supported in python implemented tools only. Nicely the documentation [now clearly says that events are not supported](https://docs.openwebui.com/features/plugin/development/events/#-availability) with OpenAPI and MCP based tools. This is the according feature request. It would be very good if we could have the same nice functionalities inside external tools also. ### Desired Solution you'd like Here are some thoughts about how this could be implemented. * As there is not the same availability of the two according (python) functions __event_emitter__ and __event_call__, there must be some other possibility for the tool server to call these. As the communication is done via REST calls, the tool server could call some defined OpenWebUI REST endpoints. * As the tool server implementation is state-less, the external tool must be able to identify the chat window which is the target of the event. Then, the tool server must send some chat window identifier together with the event call. * As OpenWebUI always initiates the communication with the tool server, there is the possibility to send some chat window identifier together with the tool call request. A special 'init' or 'send me some metadata' tool endpoint is not necessary. * For security, the chat window identifier should be thought as some secret token, not as a simple increasing integer value. This prevents that a tool server could emit or call events inside chat windows which it should not have access to. Thus my suggestion: * When OpenWebUI calls a tool server, it always sends some chat window identifier together with the request. This could be done nicely, without breaking changes as entry inside the HTTP header (e.g. chat_id). Sending this metadata inside the request body would need changes of the OpenAPI and MCP interfaces. * The OpenWebUI server offers two REST calls for event_emitter and event_call. These calls offer the exact same functionality as the python functions (they just call them under the hood), but need the chat window identifier as additional parameter. * The tool server can call these REST endpoints to emit or call events inside the right chat window now. ### Alternatives Considered _No response_ ### Additional Context _No response_
Author
Owner

@madelyngamble2 commented on GitHub (Jan 23, 2026):

@reuschling May I resolve this issue?

Regards

<!-- gh-comment-id:3790243852 --> @madelyngamble2 commented on GitHub (Jan 23, 2026): @reuschling May I resolve this issue? Regards
Author
Owner

@reuschling commented on GitHub (Jan 26, 2026):

@reuschling May I resolve this issue?

Regards

Feel free, I will appreciate :) I am no OpenWebUI developer, and happy that there is some interest on my issue.

<!-- gh-comment-id:3798688101 --> @reuschling commented on GitHub (Jan 26, 2026): > [@reuschling](https://github.com/reuschling) May I resolve this issue? > > Regards Feel free, I will appreciate :) I am no OpenWebUI developer, and happy that there is some interest on my issue.
Author
Owner

@FloMrt commented on GitHub (Feb 5, 2026):

Hey ! Also interested in this feature :)
Let me know if i can test something @madelyngamble2 !

<!-- gh-comment-id:3854046974 --> @FloMrt commented on GitHub (Feb 5, 2026): Hey ! Also interested in this feature :) Let me know if i can test something @madelyngamble2 !
Author
Owner

@tjbck commented on GitHub (Feb 5, 2026):

You can emit events to a specific message via a dedicated endpoint.

<!-- gh-comment-id:3856012046 --> @tjbck commented on GitHub (Feb 5, 2026): You can emit events to a specific message via a dedicated endpoint.
Author
Owner

@FloMrt commented on GitHub (Feb 5, 2026):

@tjbck Sorry but I don’t find anything regarding that specific endpoint on the online doc…

https://docs.openwebui.com/getting-started/api-endpoints/

<!-- gh-comment-id:3856277359 --> @FloMrt commented on GitHub (Feb 5, 2026): @tjbck Sorry but I don’t find anything regarding that specific endpoint on the online doc… https://docs.openwebui.com/getting-started/api-endpoints/
Author
Owner

@FloMrt commented on GitHub (Feb 5, 2026):

Ok I juste saw it in the swagger ui sorry.

<!-- gh-comment-id:3856300575 --> @FloMrt commented on GitHub (Feb 5, 2026): Ok I juste saw it in the swagger ui sorry.
Author
Owner

@reuschling commented on GitHub (Feb 6, 2026):

@tjbck These are good news! Nevertheless, I think there are some points open, at least for clarification:

  • The OpenWebUi documentation now clearly, explicitly says that tool events for external tools are not possible. @Classic298 did a nice job here, which leads to this feature request.
  • I searched for some documentation of a dedicated endpoint for sending events as you told, but I can't find something. @FloMrt says that there is something in a swagger ui. Maybe there is a swagger/OpenApi representation where you can see such an endpoint. But this would be more or less hidden to the users, and it seems even some OpenWebUi developers are not aware of this. Where is the documentation on this? It would be also useful to bring it up at the api-endpoints and tools => dev => events documentation.
  • The availability of such an endpoint is only a part (the bigger one) in order to support tool events for external tools. The tool must have knowledge on each call from which chat/message the current call comes. There must be some identifier for this, my suggestion was an http header entry. Maybe this entry also exists yet which would be wonderful, at least I am not aware of it.

So please, before closing this request, give us some words for clarification. If everything technical is done yet, I will vote for re-open my issue regarding documentation for external tool events.

<!-- gh-comment-id:3859318694 --> @reuschling commented on GitHub (Feb 6, 2026): @tjbck These are good news! Nevertheless, I think there are some points open, at least for clarification: * The OpenWebUi documentation now clearly, explicitly says that [tool events for external tools are not possible](https://docs.openwebui.com/features/plugin/development/events/#-availability). @Classic298 did a nice job here, which leads to this feature request. * I searched for some documentation of a dedicated endpoint for sending events as you told, but I can't find something. @FloMrt says that there is something in a swagger ui. Maybe there is a swagger/OpenApi representation where you can see such an endpoint. But this would be more or less hidden to the users, and it seems even some OpenWebUi developers are not aware of this. Where is the documentation on this? It would be also useful to bring it up at the [api-endpoints](https://docs.openwebui.com/getting-started/api-endpoints/) and [tools => dev => events](https://docs.openwebui.com/features/plugin/development/events) documentation. * The availability of such an endpoint is only a part (the bigger one) in order to support tool events for external tools. The tool must have knowledge on each call from which chat/message the current call comes. There must be some identifier for this, my suggestion was an http header entry. Maybe this entry also exists yet which would be wonderful, at least I am not aware of it. So please, before closing this request, give us some words for clarification. If everything technical is done yet, I will vote for re-open my [issue regarding documentation for external tool events](https://github.com/open-webui/docs/issues/1022).
Author
Owner

@Classic298 commented on GitHub (Feb 6, 2026):

@reuschling
events are not possible from external tools in the sense of "just use the event emitter"

that there is an endpoint for that - even i didnt know about that.

would need to dig the codebase here.

feel free to open an issue for tracking on the docs repository

<!-- gh-comment-id:3859513534 --> @Classic298 commented on GitHub (Feb 6, 2026): @reuschling events are not possible from external tools in the sense of "just use the event emitter" that there is an endpoint for that - even i didnt know about that. would need to dig the codebase here. feel free to open an issue for tracking on the docs repository
Author
Owner

@reuschling commented on GitHub (Feb 6, 2026):

feel free to open an issue for tracking on the docs repository

done. Thank you very much @Classic298

<!-- gh-comment-id:3859756108 --> @reuschling commented on GitHub (Feb 6, 2026): > feel free to open an issue for tracking on the docs repository [done](https://github.com/open-webui/docs/issues/1050). Thank you very much @Classic298
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#19324