Skip to main content
Glama
by moimran
test_get_lab_debug.pyโ€ข2.15 kB
#!/usr/bin/env python3 """ Debug script to check get_lab API response """ import asyncio import sys import os import json # Add the project root to Python path sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from eveng_mcp_server.core import get_eveng_client async def test_get_lab_debug(): """Test get_lab function to see the actual API response""" print("๐Ÿ” Testing get_lab function") print("=" * 50) client = get_eveng_client() try: # Connect to EVE-NG server print("๐Ÿ”— Connecting to EVE-NG server...") await client.connect() print("โœ… Connected successfully!") # Test get_lab for devlab print("\n๐Ÿ“‹ Testing get_lab('//dev/devlab.unl')...") try: lab_data = await client.get_lab("//dev/devlab.unl") print(f"โœ… Success! Lab data type: {type(lab_data)}") print(f"Lab data keys: {list(lab_data.keys()) if isinstance(lab_data, dict) else 'Not a dict'}") print(f"Full lab data: {json.dumps(lab_data, indent=2)}") except Exception as e: print(f"โŒ Error: {e}") import traceback traceback.print_exc() # Test get_lab for mcp_test_lab print("\n๐Ÿ“‹ Testing get_lab('//dev/mcp_test_lab.unl')...") try: lab_data = await client.get_lab("//dev/mcp_test_lab.unl") print(f"โœ… Success! Lab data type: {type(lab_data)}") print(f"Lab data keys: {list(lab_data.keys()) if isinstance(lab_data, dict) else 'Not a dict'}") print(f"Full lab data: {json.dumps(lab_data, indent=2)}") except Exception as e: print(f"โŒ Error: {e}") import traceback traceback.print_exc() # Disconnect print("\n๐Ÿ”Œ Disconnecting...") await client.disconnect() print("โœ… Disconnected successfully!") except Exception as e: print(f"โŒ Error during test: {e}") import traceback traceback.print_exc() if __name__ == "__main__": asyncio.run(test_get_lab_debug())

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/moimran/eveng-mcp'

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