Skip to main content
Glama

SAP Documentation MCP Server

by marianfoo
TEST-SEARCH.mdโ€ข5.2 kB
# ๐Ÿ” SAP Docs Search Testing Guide Test the enhanced context-aware search functionality using these testing tools. ## ๐Ÿ“ Test Files Available ### 1. **Simple Search Test** (`test-search.ts`) Quick command-line search testing with any keyword. ```bash # Test with default keyword npx tsx test-search.ts # Test specific keywords npx tsx test-search.ts wizard npx tsx test-search.ts "cds entity" npx tsx test-search.ts "wdi5 testing" npx tsx test-search.ts annotation ``` **Features:** - โฑ๏ธ Performance timing - ๐Ÿ“Š Result summary - ๐ŸŽฏ Context detection display - ๐Ÿ“– Top result preview ### 2. **Interactive Search Test** (`test-search-interactive.ts`) Advanced testing with multiple modes and analysis. ```bash # Interactive mode npx tsx test-search-interactive.ts # Run all predefined tests npx tsx test-search-interactive.ts all # Test specific query npx tsx test-search-interactive.ts "your search term" ``` **Interactive Commands:** - `all` - Run all predefined test cases - `list` - Show predefined test cases - `quit` / `exit` - Exit interactive mode - Any keyword - Test search **Features:** - ๐Ÿงช Predefined test cases with expected contexts - โœ… Context validation - ๐Ÿ“š Library breakdown analysis - ๐Ÿ† Top result highlighting - โฑ๏ธ Performance metrics ### 3. **HTTP API Tests** (`test-search.http`) โœ… **WORKING** Test the HTTP server endpoints (requires VS Code REST Client or similar). **First, start the HTTP server:** ```bash npm run start:http ``` **Then use the `.http` file to test:** - Server status check - Various search queries - Context-specific tests - **Full search functionality** with context-aware results **Example response for "wizard":** ```json { "role": "assistant", "content": "Found 10 results for 'wizard' ๐ŸŽจ **UI5 Context**:\n\n๐Ÿ”น **UI5 API Documentation:**\nโญ๏ธ **sap.f.SidePanel** (Score: 100)..." } ``` ## ๐ŸŽฏ Test Categories ### **UI5 Context Tests** ```bash npx tsx test-search.ts wizard npx tsx test-search.ts "sap.m.Button" npx tsx test-search.ts "fiori elements" ``` Expected: ๐ŸŽจ **UI5 Context** with UI5 API/Samples first ### **CAP Context Tests** ```bash npx tsx test-search.ts "cds entity" npx tsx test-search.ts service npx tsx test-search.ts aspect ``` Expected: ๐Ÿ—๏ธ **CAP Context** with CAP Documentation first ### **wdi5 Context Tests** ```bash npx tsx test-search.ts "wdi5 testing" npx tsx test-search.ts "browser automation" npx tsx test-search.ts "e2e test" ``` Expected: ๐Ÿงช **wdi5 Context** with wdi5 Documentation first ### **Mixed Context Tests** ```bash npx tsx test-search.ts annotation npx tsx test-search.ts authentication npx tsx test-search.ts routing ``` Expected: Context varies based on strongest signal ## ๐Ÿ“Š Understanding Results ### **Context Detection** ๐ŸŽฏ - **๐ŸŽจ UI5 Context**: UI5 controls, Fiori, frontend development - **๐Ÿ—๏ธ CAP Context**: CDS, entities, services, backend development - **๐Ÿงช wdi5 Context**: Testing, automation, browser testing - **๐Ÿ”€ MIXED Context**: Cross-platform or unclear context ### **Scoring System** โญ - **Score 100**: Perfect matches - **Score 90+**: High relevance matches - **Score 80+**: Good matches with context boost - **Score 70+**: Moderate relevance - **Score <70**: Lower relevance (often filtered out) ### **Library Prioritization** ๐Ÿ“š Results are ordered by relevance score, with context-aware penalties: - **CAP queries**: OpenUI5 results get 70% penalty (unless integration-related) - **wdi5 queries**: OpenUI5 results get 80% penalty (unless testing-related) - **UI5 queries**: CAP/wdi5 results get 60% penalty (unless backend/testing-related) ## ๐Ÿงช Example Test Session ```bash # Start interactive testing npx tsx test-search-interactive.ts ๐Ÿ” Enter search term (or command): wizard ๐ŸŽฏ Detected context: UI5 โœ… Context match: YES โœ… ๐Ÿ† Top result: โญ๏ธ **sap.f.SidePanel** (Score: 100)... ๐Ÿ“š Libraries found: UI5-API, UI5-Samples ๐Ÿ” Enter search term (or command): cds entity ๐ŸŽฏ Detected context: CAP โœ… Context match: YES โœ… ๐Ÿ† Top result: โญ๏ธ **Core / Built-in Types** (Score: 100)... ๐Ÿ“š Libraries found: CAP ๐Ÿ” Enter search term (or command): all ๐Ÿงช Running all predefined test cases... [Runs comprehensive test suite] ``` ## ๐Ÿš€ Quick Start 1. **Test a simple search:** ```bash npx tsx test-search.ts wizard ``` 2. **Run the full test suite:** ```bash npx tsx test-search-interactive.ts all ``` 3. **Test HTTP API (optional):** ```bash npm run start:http # Then use test-search.http file ``` ## ๐Ÿ“ˆ Performance Benchmarks Typical search times: - **Simple queries**: 1-3 seconds - **Complex queries**: 2-5 seconds - **First search** (cold start): May take longer due to index loading ## ๐Ÿ”ง Troubleshooting **No results found:** - Check spelling - Try broader terms - Use predefined test cases to verify system works **Slow performance:** - First search loads index (normal) - Subsequent searches should be faster - Check available memory **Wrong context detection:** - Context is based on keyword analysis - Mixed contexts are normal for generic terms - Use more specific terms for better context detection

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/marianfoo/mcp-sap-docs'

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