@mcp-apps/kusto-mcp-server
Version:
MCP server for interacting with Kusto databases
54 lines (53 loc) • 1.73 kB
TypeScript
export interface TableSchema {
TableName: string;
ColumnName: string;
ColumnType: string;
IsNullable: boolean;
Description?: string;
}
export interface TableInfo {
name: string;
orderedColumns: {
name: string;
type: string;
cslType: string;
}[];
}
export declare class KustoService {
private static clientCache;
private static MAX_CACHE_SIZE;
private static CACHE_EXPIRATION_MS;
private static createConnectionString;
private static cleanupCache;
/**
* Get a cached client for a specific cluster URL and database, or create a new one
*/
private static getClient;
/**
* Execute a KQL query against the Kusto database
*/
static executeQuery(clusterUrl: string, database: string, query: string): Promise<any>;
/**
* Get list of tables in the database
*/
static getTables(clusterUrl: string, database: string): Promise<{
TableName: string;
IsExternal: boolean;
}[]>;
/**
* Get detailed schema information for all tables in the database
*/
static getAllTableSchemas(clusterUrl: string, database: string): Promise<Record<string, TableInfo>>;
/**
* Get the schema for a specific table
*/
static getTableSchema(clusterUrl: string, database: string, tableName: string, isExternal?: boolean): Promise<any>;
/**
* Get sample data from a table (top N rows)
*/
static getTableSample(clusterUrl: string, database: string, tableName: string, sampleSize?: number): Promise<any[]>;
/**
* Check if the connection to Kusto is working properly
*/
static testConnection(clusterUrl: string, database: string): Promise<boolean>;
}