Skip to main content
Glama

Smart Code Search MCP Server

migrate_db_phase2.py2.03 kB
#!/usr/bin/env python3 """ Database migration script for Phase 2: Type Information & Signatures Adds columns for parameters, return_type, exceptions_raised, type_annotations """ import sqlite3 import sys from pathlib import Path def migrate_database(db_path: Path): """Add new columns for type information extraction""" if not db_path.exists(): print(f"Database not found at {db_path}") return False try: conn = sqlite3.connect(str(db_path)) cursor = conn.cursor() # Check if columns already exist cursor.execute("PRAGMA table_info(symbols)") columns = [col[1] for col in cursor.fetchall()] new_columns = [ ('parameters', 'TEXT'), # JSON array of parameter info ('return_type', 'TEXT'), # Return type annotation ('exceptions_raised', 'TEXT'), # JSON array of exceptions ('type_annotations', 'TEXT') # JSON object with all type info ] for col_name, col_type in new_columns: if col_name not in columns: print(f"Adding column: {col_name}") cursor.execute(f"ALTER TABLE symbols ADD COLUMN {col_name} {col_type}") else: print(f"Column {col_name} already exists") conn.commit() print("Migration completed successfully") # Show updated schema cursor.execute("PRAGMA table_info(symbols)") print("\nUpdated schema:") for col in cursor.fetchall(): print(f" {col[1]} ({col[2]})") conn.close() return True except Exception as e: print(f"Migration failed: {e}") return False if __name__ == "__main__": project_root = Path(__file__).parent.parent db_path = project_root / ".claude-symbols" / "search.db" print(f"Migrating database at: {db_path}") success = migrate_database(db_path) sys.exit(0 if success else 1)

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/stevenjjobson/scs-mcp'

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