File tree 1 file changed +3
-0
lines changed
1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 36
36
37
37
@mcp .tool ()
38
38
def list_databases ():
39
+ """List available ClickHouse databases"""
39
40
logger .info ("Listing all databases" )
40
41
client = create_clickhouse_client ()
41
42
result = client .command ("SHOW DATABASES" )
@@ -45,6 +46,7 @@ def list_databases():
45
46
46
47
@mcp .tool ()
47
48
def list_tables (database : str , like : str = None ):
49
+ """List available ClickHouse tables in a database"""
48
50
logger .info (f"Listing tables in database '{ database } '" )
49
51
client = create_clickhouse_client ()
50
52
query = f"SHOW TABLES FROM { quote_identifier (database )} "
@@ -131,6 +133,7 @@ def execute_query(query: str):
131
133
132
134
@mcp .tool ()
133
135
def run_select_query (query : str ):
136
+ """Run a SELECT query in a ClickHouse database"""
134
137
logger .info (f"Executing SELECT query: { query } " )
135
138
future = QUERY_EXECUTOR .submit (execute_query , query )
136
139
try :
You can’t perform that action at this time.
0 commit comments