Skip to main content
Glama

Azure MCP Server

Official
MIT License
1,161
  • Linux
  • Apple
RequirementImportanceConverter.cs1.51 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.Text.Json; using System.Text.Json.Serialization; namespace AzureMcp.CloudArchitect.Options; /// <summary> /// AOT-safe JSON converter for RequirementImportance enum that handles case-insensitive deserialization. /// </summary> public sealed class RequirementImportanceConverter : JsonConverter<RequirementImportance> { public override RequirementImportance Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { if (reader.TokenType != JsonTokenType.String) { throw new JsonException($"Expected string token, got {reader.TokenType}"); } var value = reader.GetString(); if (string.IsNullOrEmpty(value)) { throw new JsonException("Null or empty string is not a valid RequirementImportance value"); } return value.ToLowerInvariant() switch { "high" => RequirementImportance.High, "critical" => RequirementImportance.High, // Treat "critical" as "high" importance "medium" => RequirementImportance.Medium, "low" => RequirementImportance.Low, _ => throw new JsonException($"'{value}' is not a valid RequirementImportance value") }; } public override void Write(Utf8JsonWriter writer, RequirementImportance value, JsonSerializerOptions options) { writer.WriteStringValue(value.ToString()); } }

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