import sys
import logging
import json
from AbletonMCP_AI.AbletonMCP_AI.MCP_Server.server import generate_track
from unittest.mock import MagicMock

logging.basicConfig(level=logging.DEBUG)

# Mock context
ctx = MagicMock()

try:
    print("Testing generate_track...")
    res = generate_track(ctx, genre="reggaeton", style="perreo", bpm=95, key="Am", structure="standard")
    print(res)
except Exception as e:
    import traceback
    traceback.print_exc()
