Spaces:
Sleeping
Sleeping
File size: 441 Bytes
0c591a7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import sqlite3
def get_strategy_context(strategy_name: str) -> str:
"""MCP Tool Function - Query strategy database"""
db_path = 'data/strategy.db'
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
cursor.execute(
'SELECT description FROM focus_areas WHERE strategy_name = ?',
(strategy_name,)
)
row = cursor.fetchone()
conn.close()
return row[0] if row else "No such strategy found." |