Skip to main content
Glama

Azure MCP Server

Official
MIT License
1,161
  • Linux
  • Apple
ClusterGetCommand.cs2.1 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using AzureMcp.Core.Commands; using AzureMcp.Core.Services.Telemetry; using AzureMcp.Kusto.Options; using AzureMcp.Kusto.Services; using Microsoft.Extensions.Logging; namespace AzureMcp.Kusto.Commands; public sealed class ClusterGetCommand(ILogger<ClusterGetCommand> logger) : BaseClusterCommand<ClusterGetOptions> { private const string CommandTitle = "Get Kusto Cluster Details"; private readonly ILogger<ClusterGetCommand> _logger = logger; public override string Name => "get"; public override string Description => """ Get details for a specific Kusto cluster. Requires `subscription` and `cluster`. The response includes the `clusterUri` property for use in subsequent commands. """; public override string Title => CommandTitle; public override ToolMetadata Metadata => new() { Destructive = false, ReadOnly = true }; public override async Task<CommandResponse> ExecuteAsync(CommandContext context, ParseResult parseResult) { var options = BindOptions(parseResult); try { if (!Validate(parseResult.CommandResult, context.Response).IsValid) { return context.Response; } var kusto = context.GetService<IKustoService>(); var cluster = await kusto.GetCluster( options.Subscription!, options.ClusterName!, options.Tenant, options.RetryPolicy); context.Response.Results = cluster is null ? null : ResponseResult.Create(new ClusterGetCommandResult(cluster), KustoJsonContext.Default.ClusterGetCommandResult); } catch (Exception ex) { _logger.LogError(ex, "An exception occurred getting Kusto cluster details. Cluster: {Cluster}.", options.ClusterName); HandleException(context, ex); } return context.Response; } internal record ClusterGetCommandResult(KustoClusterResourceProxy Cluster); }

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/Azure/azure-mcp'

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