Skip to main content
Glama

SAP OData to MCP Server

by Raistlin82
test-dry-run-coverage.js•4.66 kB
#!/usr/bin/env node /** * Dry Run Tool Coverage Test * Validates tool definitions without requiring server startup * Perfect for CI/CD and quick validation */ import CompleteToolCoverageTest from './test-complete-tool-coverage.js'; import chalk from 'chalk'; class DryRunCoverageTest { constructor() { this.coverageTest = new CompleteToolCoverageTest({ verbose: true }); } runDryTest() { console.log(chalk.blue.bold('\nšŸ” DRY RUN TOOL COVERAGE ANALYSIS')); console.log(chalk.gray('=====================================\n')); const coverage = this.coverageTest.getCoverageReport(); console.log(chalk.green('šŸ“Š TOOL COVERAGE ANALYSIS:')); console.log(`šŸ“ˆ Total Tools Defined: ${chalk.bold(coverage.total)}`); console.log('šŸ“‚ By Category:'); Object.entries(coverage.byCategory).forEach(([category, count]) => { const icon = { 'core': 'šŸ”§', 'auth': 'šŸ”', 'routing': '🧭', 'ai': 'šŸ¤–', 'realtime': '⚔' }[category] || 'šŸ“‹'; console.log(` ${icon} ${category}: ${chalk.cyan(count)} tools`); }); console.log('\nšŸŽÆ By Test Level:'); Object.entries(coverage.byTestLevel).forEach(([level, count]) => { const color = level === 'critical' ? 'red' : level === 'basic' ? 'green' : 'yellow'; console.log(` ${chalk[color]('ā—')} ${level}: ${chalk.cyan(count)} tools`); }); console.log('\nšŸ” CRITICAL TOOLS ANALYSIS:'); const criticalTools = coverage.toolDetails.filter(t => t.testLevel === 'critical'); if (criticalTools.length > 0) { console.log(chalk.yellow(`Found ${criticalTools.length} critical tools that MUST be tested:`)); criticalTools.forEach(tool => { const authBadge = tool.requiresAuth ? chalk.red('[AUTH]') : ''; const aiBadge = tool.requiresAI ? chalk.blue('[AI]') : ''; console.log(` 🚨 ${chalk.bold(tool.name)} ${authBadge} ${aiBadge}`); console.log(` Category: ${tool.category}`); }); } console.log('\nšŸ”§ MISSING FROM PREVIOUS TESTS:'); const previouslyMissing = [ 'execute-entity-operation', 'query-performance-optimizer', 'business-process-insights', 'predictive-analytics-engine', 'business-intelligence-insights' ]; const currentTools = coverage.toolDetails.map(t => t.name); const stillMissing = previouslyMissing.filter(name => !currentTools.includes(name)); const nowCovered = previouslyMissing.filter(name => currentTools.includes(name)); console.log(chalk.green(`āœ… Now Covered (${nowCovered.length}):`)); nowCovered.forEach(tool => { console.log(` āœ… ${tool}`); }); if (stillMissing.length > 0) { console.log(chalk.red(`\nāŒ Still Missing (${stillMissing.length}):`)); stillMissing.forEach(tool => { console.log(` āŒ ${tool}`); }); } console.log('\nšŸ“‹ TOOL REGISTRATION CHECKLIST:'); console.log('To verify all tools are properly registered, check:'); console.log(` šŸ” ${chalk.cyan('src/tools/hierarchical-tool-registry.ts')} - Core tools`); console.log(` šŸ” ${chalk.cyan('src/tools/ai-enhanced-tools.ts')} - AI tools`); console.log(` šŸ” ${chalk.cyan('src/tools/realtime-tools.ts')} - Realtime tools`); console.log('\nšŸš€ NEXT STEPS:'); console.log('1. Ensure all tools are registered in MCP server'); console.log('2. Start MCP server: npm run start:stdio'); console.log('3. Run full test: npm run test:coverage'); console.log('4. Verify no "Tool not registered" errors'); console.log('\nšŸŽ‰ DRY RUN COMPLETED SUCCESSFULLY!'); return { success: true, totalTools: coverage.total, criticalTools: criticalTools.length, categories: Object.keys(coverage.byCategory).length, nowCovered: nowCovered.length, stillMissing: stillMissing.length }; } } // Main execution if (import.meta.url === `file://${process.argv[1]}`) { const dryTest = new DryRunCoverageTest(); const results = dryTest.runDryTest(); console.log(`\nšŸ“Š Summary: ${results.totalTools} tools, ${results.criticalTools} critical, ${results.categories} categories`); process.exit(0); } export default DryRunCoverageTest;

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/Raistlin82/btp-sap-odata-to-mcp-server-optimized'

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