Skip to main content
Glama

Fabric MCP Agent

by yingkiat
UI_DOCUMENTATION.md7.52 kB
# Fabric MCP Agent - UI Documentation ## Overview The Web UI (`test_ui.html`) provides an interactive interface for testing and demonstrating the Fabric MCP Agent's capabilities, including the new multi-stage execution system. ## UI Architecture ### Tab-Based Interface #### 🧠 Agentic Intelligence Tab **Primary Interface**: Business users interact with natural language questions **Features**: - Natural language input for business questions - **🆕 Multi-stage result rendering** with structured business analysis - Quick test buttons for common scenarios - Interactive data tables with SQL results - Real-time processing indicators #### 🔧 MCP Tools Tab **Developer Interface**: Direct access to individual MCP tools **Features**: - Tool selection with dynamic forms - Direct SQL input or natural language questions - Raw tool output display - Parameter customization for advanced testing #### 📝 Prompt Management Tab **Business User Control**: Edit and manage prompt modules **Features**: - Live editing of persona modules - Automatic backup creation - Real-time validation - Version history access ## 🆕 Multi-Stage Result Rendering ### Enhanced Display System The UI now intelligently detects and renders multi-stage execution results with structured business analysis. #### Business Analysis Section (🎯) **Primary Display**: Stage 3 evaluation results in user-friendly format **Components**: - **Business Answer**: Direct response to user question in highlighted format - **Key Findings**: Bullet-pointed insights from analysis - **Recommended Action**: Actionable next steps in emphasized box - **Confidence Indicators**: Color-coded confidence levels (high=green, medium=yellow, low=red) - **Data Quality Assessment**: Reliability evaluation of results **Example Display**: ``` 🎯 Business Analysis Answer: The equivalent product for Terumo BD Luer-Lock Syringe 2.5mL is identified as '08-139-NPR: シリンジ2.5ML ルアーロック (ピンク)'. Pricing analysis shows a unit price of ¥9.44, with total kit prices ranging from ¥9 to ¥18 depending on kit configuration. Key Findings: • The matched product '08-139-NPR' meets specifications including volume (2.5mL) and lock type • The product is included in multiple kits with varying quantities and total prices • Unit price of ¥9.44 is competitive and provides potential savings Recommended Action: Provide the customer with a detailed quote highlighting the matched product and emphasize competitive pricing compared to Terumo's offering. Confidence: high Data Quality: good - comprehensive dataset retrieved ``` #### Detailed Data Section (📊) **Secondary Display**: SQL results from Stages 1 & 2 **Features**: - Formatted data tables with sortable columns - Optimized display for large result sets - Clear column headers and data types - Hover effects for better readability #### Data Summary Section (📋) **Contextual Information**: Summary statistics and metadata **Components**: - Record counts and data completeness - Column descriptions and data types - Processing context and business domain ### UI Rendering Logic #### Detection Strategy ```javascript // Check for multi-stage results if (result.tool_chain_results && result.tool_chain_results.stage3_evaluation) { displayAgenticResults(result); } else if (result.tool_chain_results && result.tool_chain_results.run_sql_query) { displaySQLResults(result.tool_chain_results.run_sql_query.results); } ``` #### Multi-Stage Display Priority 1. **Stage 3 Business Analysis** (primary focus) 2. **Stage 2 Detailed Data** (supporting evidence) 3. **Data Summary** (context and metadata) #### Fallback Handling - Graceful degradation for missing sections - Raw JSON display for debugging when structured display fails - Error messaging for incomplete results ## Response Structure Compatibility ### Multi-Stage Response Format ```json { "tool_chain_results": { "stage3_evaluation": { "business_answer": "Direct business answer", "key_findings": ["finding1", "finding2"], "recommended_action": "Next steps", "supporting_data": { "confidence": "high|medium|low", "primary_values": "key metrics" }, "data_quality": "assessment" }, "stage2_query": { "results": [{"col1": "value1", "col2": "value2"}] }, "summarize_results": { "summary": "Business summary", "row_count": 106 } } } ``` ### Single-Stage Response Format (Legacy) ```json { "tool_chain_results": { "run_sql_query": { "results": [{"col1": "value1", "col2": "value2"}] }, "summarize_results": { "summary": "Business summary" } } } ``` ## Styling and Visual Design ### Color Scheme - **Primary Blue**: #4facfe (headers, buttons, highlights) - **Success Green**: #28a745 (high confidence, positive indicators) - **Warning Yellow**: #ffc107 (medium confidence, caution indicators) - **Error Red**: #dc3545 (low confidence, error states) - **Background**: Light gradients for section separation ### Typography - **Headers**: Bold, clear hierarchy with emoji icons - **Business Content**: Larger font size (16px) for readability - **Technical Details**: Monospace for data tables and JSON - **Interactive Elements**: Clear hover states and focus indicators ### Layout Principles - **Mobile-First**: Responsive design with grid layouts - **Progressive Disclosure**: Primary insights first, details on demand - **Visual Hierarchy**: Clear information prioritization - **Accessibility**: Proper contrast ratios and keyboard navigation ## Testing and Quality Assurance ### Automated UI Testing - **Response Structure Validation**: Ensure UI handles various response formats - **Cross-Browser Compatibility**: Testing across major browsers - **Performance Testing**: Large dataset rendering optimization - **Error Handling**: Graceful failure scenarios ### User Experience Testing - **Business User Scenarios**: Non-technical user interaction patterns - **Developer Scenarios**: Technical debugging and tool access - **Performance Perception**: Loading states and progress indicators - **Information Architecture**: Logical flow and discoverability ## Future UI Enhancements ### Real-Time Features - **Streaming Results**: Display Stage 1 results while Stage 2 executes - **Progress Indicators**: Stage-by-stage execution progress - **WebSocket Integration**: Real-time updates and notifications ### Advanced Visualization - **Chart Integration**: Automatic chart generation for numerical data - **Data Export**: CSV/Excel export functionality - **Print Optimization**: Business report formatting ### Collaboration Features - **Session Sharing**: Share analysis results with stakeholders - **Annotation System**: Add notes and comments to results - **History Tracking**: Previous question and result history ### Accessibility Improvements - **Screen Reader Optimization**: Enhanced semantic markup - **Keyboard Navigation**: Full keyboard accessibility - **High Contrast Mode**: Visual accessibility options - **Text Scaling**: Support for various text size preferences This enhanced UI provides a professional, business-friendly interface that transforms complex multi-stage AI analysis into clear, actionable insights for business users while maintaining technical debugging capabilities for developers.

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yingkiat/mcp_fabric_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server