5.1 KiB
Native Tool Display Usage Guide
🎨 What is Native Tool Display?
Native Tool Display is an experimental feature that integrates with OpenWebUI's built-in tool call visualization system. When enabled, tool calls and their results are displayed in collapsible JSON panels instead of plain markdown text.
Visual Comparison
Traditional Display (markdown):
> 🔧 Running Tool: `get_current_time`
> ✅ Tool Completed: 2026-01-27 10:30:00
Native Display (collapsible panels):
- Tool call appears in a collapsible
assistant.tool_callspanel - Tool result appears in a separate collapsible
tool.contentpanel - JSON syntax highlighting for better readability
- Compact by default, expandable on click
🚀 How to Enable
- Open the GitHub Copilot SDK Pipe configuration (Valves)
- Set
USE_NATIVE_TOOL_DISPLAYtotrue - Save the configuration
- Start a new conversation with tool calls
📋 Requirements
- OpenWebUI with native tool display support
__event_emitter__must supportmessagetype events- Tool-enabled models (e.g., GPT-4, Claude Sonnet)
⚙️ How It Works
OpenAI Standard Format
The native display uses the OpenAI standard message format:
Tool Call (Assistant Message):
{
"role": "assistant",
"content": "",
"tool_calls": [
{
"id": "call_abc123",
"type": "function",
"function": {
"name": "get_current_time",
"arguments": "{\"timezone\":\"UTC\"}"
}
}
]
}
Tool Result (Tool Message):
{
"role": "tool",
"tool_call_id": "call_abc123",
"content": "2026-01-27 10:30:00 UTC"
}
Message Flow
-
Tool Execution Start:
- SDK emits
tool.execution_startevent - Plugin sends
assistantmessage withtool_callsarray - OpenWebUI displays collapsible tool call panel
- SDK emits
-
Tool Execution Complete:
- SDK emits
tool.execution_completeevent - Plugin sends
toolmessage withtool_call_idandcontent - OpenWebUI displays collapsible result panel
- SDK emits
🔧 Troubleshooting
Panel Not Showing
Symptoms: Tool calls still appear as markdown text
Possible Causes:
__event_emitter__doesn't supportmessagetype events- OpenWebUI version too old
- Feature not enabled (
USE_NATIVE_TOOL_DISPLAY = false)
Solution:
- Enable DEBUG mode to see error messages in browser console
- Check browser console for "Native message emission failed" warnings
- Update OpenWebUI to latest version
- Keep
USE_NATIVE_TOOL_DISPLAY = falseto use traditional markdown display
Duplicate Tool Information
Symptoms: Tool calls appear in both native panels and markdown
Cause: Mixed display modes
Solution:
- Ensure
USE_NATIVE_TOOL_DISPLAYis eithertrue(native only) orfalse(markdown only) - Restart the conversation after changing this setting
🧪 Experimental Status
This feature is marked as EXPERIMENTAL because:
- Event Emitter API: The
__event_emitter__support formessagetype events is not fully documented - OpenWebUI Version Dependency: Requires recent versions of OpenWebUI with native tool display support
- Streaming Architecture: May have compatibility issues with streaming responses
Fallback Behavior
If native message emission fails:
- Plugin automatically falls back to markdown display
- Error logged to browser console (when DEBUG is enabled)
- No interruption to conversation flow
📊 Performance Considerations
Native display has slightly better performance characteristics:
| Aspect | Native Display | Markdown Display |
|---|---|---|
| Rendering | Native UI components | Markdown parser |
| Interactivity | Collapsible panels | Static text |
| JSON Parsing | Handled by UI | Not formatted |
| Token Usage | Minimal overhead | Formatting tokens |
🔮 Future Enhancements
Planned improvements for native tool display:
- Automatic fallback detection
- Tool call history persistence
- Rich metadata display (execution time, arguments preview)
- Copy tool call JSON button
- Tool call replay functionality
💡 Best Practices
- Enable DEBUG First: Test with DEBUG mode before using in production
- Monitor Browser Console: Check for warning messages during tool calls
- Test with Simple Tools: Verify with built-in tools before custom implementations
- Keep Fallback Option: Don't rely solely on native display until it exits experimental status
📖 Related Documentation
- TOOLS_USAGE.md - How to create and use custom tools
- NATIVE_TOOL_DISPLAY_GUIDE.md - Technical implementation details
- WORKFLOW.md - Complete integration workflow
🐛 Reporting Issues
If you encounter issues with native tool display:
- Enable
DEBUGandUSE_NATIVE_TOOL_DISPLAY - Open browser console (F12)
- Trigger a tool call
- Copy any error messages
- Report to GitHub Issues
Include:
- OpenWebUI version
- Browser and version
- Error messages from console
- Steps to reproduce
Author: Fu-Jie | Version: 0.2.0 | License: MIT