feat: add tool_ids support for Open WebUI MCP tools#10
Open
ahadrez wants to merge 4 commits into
Open
Conversation
Pass tool_ids as a URL query parameter (comma-separated) to include Open WebUI tool IDs (e.g. MCP servers) in chat completion requests. This enables MCP tool activation when the widget is embedded. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The non-streaming /api/chat/completions endpoint doesn't execute Open WebUI's MCP tool pipeline. Streaming mode enables tool context injection and provides real-time response rendering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix conversation context bug: send full message history instead of only last message - Add welcome screen with icon, title, subtitle, and 3 suggested prompts - Add configurable title via 'title' URL param (defaults to 'GCP Cost Assistant') - Add 'New chat' button to clear conversation - Switch to Google Blue (#4285f4) color scheme - Styled send button with blue background - Better placeholder: 'Ask about GCP costs and pricing...' - Chat bubble icon instead of layers icon Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reads 'prompts' query parameter as pipe-separated list of prompts. Falls back to hardcoded defaults when not provided. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tool_idsURL query parameter support to the chat widget/api/chat/completionsrequest body astool_idsUse Case
When embedding the widget in an application, you can now pass MCP tool IDs to enable tool usage:
The widget will include
"tool_ids": ["server:mcp:gc-cost"]in the request body, activating the configured MCP tools in Open WebUI.Changes
toolIdsstate variable (src/lib/ChatWidget.svelte)tool_idsfrom URL query parameters (comma-separated parsing)tool_idsarray in the fetch request body when tool IDs are presentTest plan
tool_idsparam (backwards compatible, no change in behavior)tool_idsin request body when param is providedtool_idsis passed🤖 Generated with Claude Code