#!/usr/bin/env python3
"""
๐งช Test Script: Identify Which Enhanced Chat Function is Being Called
"""
def test_which_enhanced_chat():
"""Test which enhanced_chat function is being called"""
print("๐งช TESTING WHICH ENHANCED CHAT FUNCTION IS BEING CALLED")
print("=" * 70)
try:
# Test 1: Check main.py enhanced_chat
print("1๏ธโฃ Testing main.py enhanced_chat...")
try:
from main import enhanced_chat as main_enhanced_chat
print("โ main.py enhanced_chat imported successfully")
# Test if it works
result = main_enhanced_chat("test message")
print(f"โ main.py enhanced_chat result length: {len(result)}")
print(f"๐ Contains context: {'๐ฌ CONTEXT:' in result}")
print(f"๐ Contains recent: {'๐ RECENT:' in result}")
print(f"๐ฏ Contains goals: {'๐ฏ GOALS:' in result}")
except Exception as e:
print(f"โ main.py enhanced_chat failed: {e}")
# Test 2: Check local_mcp_server_simple.py enhanced_chat
print("\n2๏ธโฃ Testing local_mcp_server_simple.py enhanced_chat...")
try:
from local_mcp_server_simple import enhanced_chat as local_enhanced_chat
print("โ local_mcp_server_simple.py enhanced_chat imported successfully")
# Test if it works
result = local_enhanced_chat("test message")
print(f"โ local_mcp_server_simple.py enhanced_chat result length: {len(result)}")
print(f"๐ Contains context: {'๐ฌ CONTEXT:' in result}")
print(f"๐ Contains recent: {'๐ RECENT:' in result}")
print(f"๐ฏ Contains goals: {'๐ฏ GOALS:' in result}")
except Exception as e:
print(f"โ local_mcp_server_simple.py enhanced_chat failed: {e}")
# Test 3: Check which one the MCP system is using
print("\n3๏ธโฃ Checking MCP system integration...")
try:
# Try to import the MCP tools
from enhanced_mcp_tools import enhanced_prompt_generation
print("โ enhanced_mcp_tools.enhanced_prompt_generation available")
# Test the MCP tool
result = enhanced_prompt_generation("test message")
print(f"โ MCP tool result length: {len(result)}")
print(f"๐ Contains context: {'๐ฌ CONTEXT:' in result}")
print(f"๐ Contains recent: {'๐ RECENT:' in result}")
print(f"๐ฏ Contains goals: {'๐ฏ GOALS:' in result}")
except Exception as e:
print(f"โ MCP tool failed: {e}")
print("\n" + "=" * 70)
print("๐งช TEST COMPLETE")
except Exception as e:
print(f"โ Error during testing: {e}")
import traceback
traceback.print_exc()
if __name__ == "__main__":
test_which_enhanced_chat()
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