Skip to main content
Glama
test-guidance.ts1.92 kB
#!/usr/bin/env node import dotenv from 'dotenv'; import { UmbrellaMcpServer } from './server.js'; dotenv.config(); async function testGuidanceFeature() { console.log('🧪 TESTING UMBRELLA GUIDANCE FEATURE'); console.log('==================================='); const baseURL = process.env.UMBRELLA_API_BASE_URL || 'https://api.umbrellacost.io/api/v1'; const server = new UmbrellaMcpServer(baseURL); // Test cases for different scenarios const testCases = [ { name: 'General Guidance', args: {} }, { name: 'AWS-only Service (Redshift)', args: { service_name: 'redshift', query_type: 'cost' } }, { name: 'GCP-only Service (BigQuery)', args: { service_name: 'bigquery', query_type: 'cost' } }, { name: 'Multi-cloud Service (MySQL)', args: { service_name: 'mysql', query_type: 'cost' } }, { name: 'Recommendations Query', args: { query_type: 'recommendations' } }, { name: 'Anomalies Query', args: { query_type: 'anomalies' } }, { name: 'Service Analysis', args: { query_type: 'service-analysis', service_name: 'lambda' } } ]; for (const testCase of testCases) { console.log(`\n${'='.repeat(60)}`); console.log(`📋 TEST CASE: ${testCase.name}`); console.log(`Arguments: ${JSON.stringify(testCase.args)}`); console.log(`${'='.repeat(60)}`); try { // Call the guidance handler directly const result = (server as any).handleUmbrellaGuidance(testCase.args); console.log('🤖 GUIDANCE RESPONSE:'); console.log(result.content[0].text); } catch (error: any) { console.log(`❌ ERROR: ${error.message}`); } } console.log(`\n${'🎉'.repeat(20)}`); console.log('GUIDANCE TESTING COMPLETE'); console.log(`${'🎉'.repeat(20)}`); } testGuidanceFeature().catch(console.error);

Latest Blog Posts

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/daviddraiumbrella/invoice-monitoring'

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