KustoClient
Attributes
ChartType
module-attribute
Classes
VisualizeResults
dataclass
VisualizeResults(body: Optional[str] = None, body_html: Optional[str] = None, attachment_content: Optional[str] = None, attachment_name: Optional[str] = None, kusto_deep_link: Optional[str] = None)
Response for Run KQL query and render a chart
Attributes
body
class-attribute
instance-attribute
The body of the result in base64 encoding.
body_html
class-attribute
instance-attribute
The body of the result in html encoding.
attachment_content
class-attribute
instance-attribute
attachment_content: Optional[str] = field(default=None, metadata={'wire_name': 'attachmentContent'})
The content of the attachment.
attachment_name
class-attribute
instance-attribute
The name of the attachment file.
AsyncCommandResult
dataclass
AsyncCommandResult(state: Optional[str] = None, status: Optional[str] = None, operation_id: Optional[str] = None)
Response for Run async control command
Attributes
MCPQueryResponse
dataclass
MCPQueryResponse(jsonrpc: Optional[str] = None, id: Optional[str] = None, method: Optional[str] = None, params: Optional[Dict[str, Any]] = None, result: Optional[Dict[str, Any]] = None, error: Optional[Dict[str, Any]] = None)
Response for Kusto Query MCP Server
ObjectEntity
dataclass
Row
dataclass
QueryAndVisualizeSchema
dataclass
QueryAndVisualizeSchema(cluster: Optional[ClusterName] = None, db: Optional[DatabaseName] = None, csl: Optional[Query] = None, chart_type: Optional[ChartType] = None)
Definition: QueryAndVisualizeSchema
CommandAndVisualizeSchema
dataclass
QueryAndListSchema
dataclass
QueryAndListSchema(cluster: Optional[ClusterName] = None, db: Optional[DatabaseName] = None, csl: Optional[Query] = None)
Definition: QueryAndListSchema
ControlCommandAndListSchema
dataclass
MCPQueryRequest
dataclass
MCPQueryRequest(jsonrpc: Optional[str] = None, id: Optional[str] = None, method: Optional[str] = None, params: Optional[Dict[str, Any]] = None, result: Optional[Dict[str, Any]] = None, error: Optional[Dict[str, Any]] = None, callback_endpoint: Optional[str] = None)
Definition: MCPQueryRequest
KustoClient
KustoClient(connection_runtime_url: str, token_provider: Optional[TokenProvider] = None, options: Optional[ConnectorClientOptions] = None)
Bases: ConnectorClientBase
Typed client for kusto connector.
Initialize a KustoClient.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
connection_runtime_url
|
str
|
The connection runtime URL from Azure Portal. |
required |
token_provider
|
Optional[TokenProvider]
|
Optional token provider. Defaults to ManagedIdentityTokenProvider. |
None
|
options
|
Optional[ConnectorClientOptions]
|
Optional connector client options. |
None
|
Methods:
list_kusto_results_async
async
Run KQL query
Runs the KQL query and returns the result as a set of rows which can be iterated over in the following connectors e.g TableName | take 10.
list_kusto_show_command_results_async
async
Run show control command
Runs the show control command and returns the result as a set of rows which can be iterated over in the following connectors e.g .show table TableName policy caching.
run_kusto_query_and_visualize_results_async
async
run_kusto_query_and_visualize_results_async(input: QueryAndVisualizeSchema) -> dict[str, Any] | None
Run KQL query and render a chart
Runs the KQL query and returns result as a chart of your choice e.g TableName | where Timestamp > ago(1h) | project timestamp, value.
run_kusto_command_and_visualize_results_async
async
run_kusto_command_and_visualize_results_async(input: CommandAndVisualizeSchema) -> dict[str, Any] | None
Run control command and render a chart
Runs the control command and returns the result as a chart of your choice e.g .clear table TableName data.
run_async_control_command_and_wait_async
async
run_async_control_command_and_wait_async(input: ControlCommandAndListSchema) -> dict[str, Any] | None
Run async control command
Runs control command in async mode and returns its ID, state and status on completion. Command can run for maximum 1 hour. The 'async' keyword is mandatory e.g .set-or-append async TargetTable <| SourceTable.