Skip to main content
Glama

MCP Agent Tracker

by Big0290
debug_context_data.py•3.33 kB
#!/usr/bin/env python3 """ šŸ” Debug Script: Test what context data is available """ def test_context_data(): """Test what context data is available""" print("šŸ” DEBUGGING CONTEXT DATA AVAILABILITY") print("=" * 50) try: # Test 1: Import prompt generator print("1ļøāƒ£ Testing prompt generator import...") from prompt_generator import PromptGenerator generator = PromptGenerator() print("āœ… PromptGenerator imported successfully") # Test 2: Test context gathering print("\n2ļøāƒ£ Testing context gathering...") context = generator._gather_context_data("test message", "smart") print(f"āœ… Context gathered successfully") print(f"šŸ“‹ Context type: {type(context)}") # Test 3: Check context fields print("\n3ļøāƒ£ Checking context fields...") print(f"šŸ“‹ Conversation summary: {hasattr(context, 'conversation_summary')}") if hasattr(context, 'conversation_summary'): print(f" Content: {context.conversation_summary[:100]}...") print(f"šŸ“‹ Action history: {hasattr(context, 'action_history')}") if hasattr(context, 'action_history'): print(f" Content: {context.action_history[:100]}...") print(f"šŸ“‹ User preferences: {hasattr(context, 'user_preferences')}") if hasattr(context, 'user_preferences'): print(f" Content: {context.user_preferences[:100]}...") print(f"šŸ“‹ Tech stack: {hasattr(context, 'tech_stack')}") if hasattr(context, 'tech_stack'): print(f" Content: {context.tech_stack[:100]}...") # Test 4: Test optimized prompt generator print("\n4ļøāƒ£ Testing optimized prompt generator...") from optimized_prompt_generator import OptimizedPromptGenerator opt_generator = OptimizedPromptGenerator() print("āœ… OptimizedPromptGenerator imported successfully") # Test 5: Test context conversion print("\n5ļøāƒ£ Testing context conversion...") context_dict = opt_generator._context_to_dict(context) print(f"āœ… Context converted to dict") print(f"šŸ“‹ Available keys: {list(context_dict.keys())}") # Test 6: Test intent classification print("\n6ļøāƒ£ Testing intent classification...") if opt_generator.intent_selector: relevant_context, intent_analysis = opt_generator.intent_selector.select_relevant_context( "test to see if we now have action history and conversation summary", context_dict ) print(f"āœ… Intent classified successfully") print(f"šŸŽÆ Intent: {intent_analysis.primary_intent.value}") print(f"šŸ“‹ Context requirements: {intent_analysis.context_requirements}") print(f"šŸ”§ Selected context: {list(relevant_context.keys())}") else: print("āš ļø Intent selector not available") print("\n" + "=" * 50) print("šŸ” DEBUG COMPLETE") except Exception as e: print(f"āŒ Error during debugging: {e}") import traceback traceback.print_exc() if __name__ == "__main__": test_context_data()

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/Big0290/MCP'

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