"""get_database_info MCP tool implementation.""" from xer_mcp.db import db async def get_database_info() -> dict: """Get information about the currently loaded database. Returns connection details for direct SQL access including database path, schema information, and metadata. Returns: Dictionary with database info or error if no database loaded """ if not db.is_initialized: return { "error": { "code": "NO_FILE_LOADED", "message": "No XER file is loaded. Use the load_xer tool first.", } } return { "database": db.get_database_info(), }