From ac56dcb973ee77ea726216a0de876c802e417ff9 Mon Sep 17 00:00:00 2001 From: Jonathan Cardenas Date: Tue, 7 Oct 2025 12:36:18 -0700 Subject: [PATCH 1/5] Add additionalFilter parameter name to GetRegistry and GetNamespace methods --- tools/Azure.Mcp.Tools.Acr/src/Services/AcrService.cs | 2 +- .../Azure.Mcp.Tools.EventHubs/src/Services/EventHubsService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/Azure.Mcp.Tools.Acr/src/Services/AcrService.cs b/tools/Azure.Mcp.Tools.Acr/src/Services/AcrService.cs index e798bdfe13..9ebaa3f7bb 100644 --- a/tools/Azure.Mcp.Tools.Acr/src/Services/AcrService.cs +++ b/tools/Azure.Mcp.Tools.Acr/src/Services/AcrService.cs @@ -61,7 +61,7 @@ private async Task GetRegistry( subscription, retryPolicy, ConvertToAcrRegistryInfoModel, - $"name =~ '{EscapeKqlString(registry)}'"); + additionalFilter: $"name =~ '{EscapeKqlString(registry)}'"); if (registrie == null) { throw new KeyNotFoundException($"Container registry '{registry}' not found for subscription '{subscription}'."); diff --git a/tools/Azure.Mcp.Tools.EventHubs/src/Services/EventHubsService.cs b/tools/Azure.Mcp.Tools.EventHubs/src/Services/EventHubsService.cs index 6397763479..dff23cdb46 100644 --- a/tools/Azure.Mcp.Tools.EventHubs/src/Services/EventHubsService.cs +++ b/tools/Azure.Mcp.Tools.EventHubs/src/Services/EventHubsService.cs @@ -98,7 +98,7 @@ public async Task GetNamespaceAsync( subscription, retryPolicy, ConvertToNamespace, - $"name =~ '{EscapeKqlString(namespaceName)}'"); + additionalFilter: $"name =~ '{EscapeKqlString(namespaceName)}'"); if (namespaceDetails == null) { From e2a5812781b473025ee3971c8bacc0eab575900e Mon Sep 17 00:00:00 2001 From: Jonathan Cardenas Date: Tue, 7 Oct 2025 12:40:27 -0700 Subject: [PATCH 2/5] Update changelog --- servers/Azure.Mcp.Server/CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/servers/Azure.Mcp.Server/CHANGELOG.md b/servers/Azure.Mcp.Server/CHANGELOG.md index 20641d3af8..016ab201e8 100644 --- a/servers/Azure.Mcp.Server/CHANGELOG.md +++ b/servers/Azure.Mcp.Server/CHANGELOG.md @@ -25,7 +25,8 @@ The Azure MCP Server updates automatically by default whenever a new release com - Improved error message for macOS users when interactive browser authentication fails due to broker threading requirements. The error now provides clear guidance to use Azure CLI, Azure PowerShell, or Azure Developer CLI for authentication instead.[[#684](https://github.com/microsoft/mcp/pull/684)] - Added validation for the Cosmos query command `azmcp_cosmos_database_container_item_query`.[[#524](https://github.com/microsoft/mcp/pull/524)] - Fixed the construction of Azure Resource Graph queries for App Configuration in the `FindAppConfigStore` method. The name filter is now correctly passed via the `additionalFilter` parameter instead of `tableName`, resolving "ExactlyOneStartingOperatorRequired" and "BadRequest" errors when setting key-value pairs. [[#670](https://github.com/microsoft/mcp/pull/670)] -- Updated the description of the Monitor tool and corrected the prompt for command `monitor_healthmodels_entity_gethealth` to ensure that the LLM picks up the correct tool. [[#630](https://github.com/microsoft/mcp/pull/630)] +- Updated the description of the Monitor tool and corrected the prompt for command `monitor_healthmodels_entity_gethealth` to ensure that the LLM picks up the correct tool. [[#630](https://github.com/microsoft/mcp/pull/630)] +- Fixed BadRequest error in Azure Containter Registry to get a registry, and in EventHubs to get a namespace. ### Other Changes From 9ec5dc376e8edeb023c75ccd17fd0dcb9c79da0a Mon Sep 17 00:00:00 2001 From: Jonathan Cardenas Date: Tue, 7 Oct 2025 12:49:35 -0700 Subject: [PATCH 3/5] Specify parameters names on all references --- tools/Azure.Mcp.Tools.Acr/src/Services/AcrService.cs | 8 ++++---- .../src/Services/AppConfigService.cs | 6 +++--- .../src/Services/EventHubsService.cs | 8 ++++---- tools/Azure.Mcp.Tools.Kusto/src/Services/KustoService.cs | 6 +++--- tools/Azure.Mcp.Tools.Sql/src/Services/SqlService.cs | 8 ++++---- .../src/Services/StorageService.cs | 8 ++++---- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tools/Azure.Mcp.Tools.Acr/src/Services/AcrService.cs b/tools/Azure.Mcp.Tools.Acr/src/Services/AcrService.cs index 9ebaa3f7bb..0fe5c2553c 100644 --- a/tools/Azure.Mcp.Tools.Acr/src/Services/AcrService.cs +++ b/tools/Azure.Mcp.Tools.Acr/src/Services/AcrService.cs @@ -57,10 +57,10 @@ private async Task GetRegistry( { var registrie = await ExecuteSingleResourceQueryAsync( "Microsoft.ContainerRegistry/registries", - resourceGroup, - subscription, - retryPolicy, - ConvertToAcrRegistryInfoModel, + resourceGroup: resourceGroup, + subscription: subscription, + retryPolicy: retryPolicy, + converter: ConvertToAcrRegistryInfoModel, additionalFilter: $"name =~ '{EscapeKqlString(registry)}'"); if (registrie == null) { diff --git a/tools/Azure.Mcp.Tools.AppConfig/src/Services/AppConfigService.cs b/tools/Azure.Mcp.Tools.AppConfig/src/Services/AppConfigService.cs index 4833eabe3c..7f1561c42c 100644 --- a/tools/Azure.Mcp.Tools.AppConfig/src/Services/AppConfigService.cs +++ b/tools/Azure.Mcp.Tools.AppConfig/src/Services/AppConfigService.cs @@ -165,9 +165,9 @@ private async Task FindAppConfigStore(string subscripti var account = await ExecuteSingleResourceQueryAsync( "Microsoft.AppConfiguration/configurationStores", resourceGroup: null, // all resource groups - subscription, - retryPolicy, - ConvertToAppConfigurationAccountModel, + subscription: subscription, + retryPolicy: retryPolicy, + converter: ConvertToAppConfigurationAccountModel, additionalFilter: $"name =~ '{EscapeKqlString(accountName)}'"); if (account == null) diff --git a/tools/Azure.Mcp.Tools.EventHubs/src/Services/EventHubsService.cs b/tools/Azure.Mcp.Tools.EventHubs/src/Services/EventHubsService.cs index dff23cdb46..74ad497c88 100644 --- a/tools/Azure.Mcp.Tools.EventHubs/src/Services/EventHubsService.cs +++ b/tools/Azure.Mcp.Tools.EventHubs/src/Services/EventHubsService.cs @@ -94,10 +94,10 @@ public async Task GetNamespaceAsync( { var namespaceDetails = await ExecuteSingleResourceQueryAsync( "Microsoft.EventHub/namespaces", - resourceGroup, - subscription, - retryPolicy, - ConvertToNamespace, + resourceGroup: resourceGroup, + subscription: subscription, + retryPolicy: retryPolicy, + converter: ConvertToNamespace, additionalFilter: $"name =~ '{EscapeKqlString(namespaceName)}'"); if (namespaceDetails == null) diff --git a/tools/Azure.Mcp.Tools.Kusto/src/Services/KustoService.cs b/tools/Azure.Mcp.Tools.Kusto/src/Services/KustoService.cs index 3d6a1c1edb..883430c7da 100644 --- a/tools/Azure.Mcp.Tools.Kusto/src/Services/KustoService.cs +++ b/tools/Azure.Mcp.Tools.Kusto/src/Services/KustoService.cs @@ -73,9 +73,9 @@ public async Task GetClusterAsync( var cluster = await ExecuteSingleResourceQueryAsync( "Microsoft.Kusto/clusters", resourceGroup: null, // all resource groups - subscriptionId, - retryPolicy, - ConvertToClusterModel, + subscription: subscriptionId, + retryPolicy: retryPolicy, + converter: ConvertToClusterModel, additionalFilter: $"name =~ '{EscapeKqlString(clusterName)}'"); if (cluster == null) diff --git a/tools/Azure.Mcp.Tools.Sql/src/Services/SqlService.cs b/tools/Azure.Mcp.Tools.Sql/src/Services/SqlService.cs index 761b6fa408..4574bfb7c4 100644 --- a/tools/Azure.Mcp.Tools.Sql/src/Services/SqlService.cs +++ b/tools/Azure.Mcp.Tools.Sql/src/Services/SqlService.cs @@ -43,10 +43,10 @@ public async Task GetDatabaseAsync( { var result = await ExecuteSingleResourceQueryAsync( "Microsoft.Sql/servers/databases", - resourceGroup, - subscription, - retryPolicy, - ConvertToSqlDatabaseModel, + resourceGroup: resourceGroup, + subscription: subscription, + retryPolicy: retryPolicy, + converter: ConvertToSqlDatabaseModel, additionalFilter: $"name =~ '{EscapeKqlString(databaseName)}'", cancellationToken: cancellationToken); diff --git a/tools/Azure.Mcp.Tools.Storage/src/Services/StorageService.cs b/tools/Azure.Mcp.Tools.Storage/src/Services/StorageService.cs index 54767f0d6e..498aa5ff2d 100644 --- a/tools/Azure.Mcp.Tools.Storage/src/Services/StorageService.cs +++ b/tools/Azure.Mcp.Tools.Storage/src/Services/StorageService.cs @@ -69,10 +69,10 @@ public async Task> GetAccountDetails( { var storageAccount = await ExecuteSingleResourceQueryAsync( "Microsoft.Storage/storageAccounts", - null, - subscription, - retryPolicy, - ConvertToAccountInfoModel, + resourceGroup: null, + subscription: subscription, + retryPolicy: retryPolicy, + converter: ConvertToAccountInfoModel, additionalFilter: $"name =~ '{EscapeKqlString(account)}'"); if (storageAccount == null) From f5a4fe0e0e8ff72223da846d530eb6a9e1b88d64 Mon Sep 17 00:00:00 2001 From: Jonathan Cardenas Date: Tue, 7 Oct 2025 12:54:10 -0700 Subject: [PATCH 4/5] Add PR to changelog --- servers/Azure.Mcp.Server/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/Azure.Mcp.Server/CHANGELOG.md b/servers/Azure.Mcp.Server/CHANGELOG.md index 016ab201e8..997a920ba9 100644 --- a/servers/Azure.Mcp.Server/CHANGELOG.md +++ b/servers/Azure.Mcp.Server/CHANGELOG.md @@ -26,7 +26,7 @@ The Azure MCP Server updates automatically by default whenever a new release com - Added validation for the Cosmos query command `azmcp_cosmos_database_container_item_query`.[[#524](https://github.com/microsoft/mcp/pull/524)] - Fixed the construction of Azure Resource Graph queries for App Configuration in the `FindAppConfigStore` method. The name filter is now correctly passed via the `additionalFilter` parameter instead of `tableName`, resolving "ExactlyOneStartingOperatorRequired" and "BadRequest" errors when setting key-value pairs. [[#670](https://github.com/microsoft/mcp/pull/670)] - Updated the description of the Monitor tool and corrected the prompt for command `monitor_healthmodels_entity_gethealth` to ensure that the LLM picks up the correct tool. [[#630](https://github.com/microsoft/mcp/pull/630)] -- Fixed BadRequest error in Azure Containter Registry to get a registry, and in EventHubs to get a namespace. +- Fixed BadRequest error in Azure Containter Registry to get a registry, and in EventHubs to get a namespace. [[#729](https://github.com/microsoft/mcp/pull/729)] ### Other Changes From 612d1ef939e39fb18df4309a6633a0f8d23be52e Mon Sep 17 00:00:00 2001 From: Jonathan Cardenas Date: Tue, 7 Oct 2025 12:58:17 -0700 Subject: [PATCH 5/5] Fix typo in changelog --- servers/Azure.Mcp.Server/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/Azure.Mcp.Server/CHANGELOG.md b/servers/Azure.Mcp.Server/CHANGELOG.md index 997a920ba9..2825326252 100644 --- a/servers/Azure.Mcp.Server/CHANGELOG.md +++ b/servers/Azure.Mcp.Server/CHANGELOG.md @@ -26,7 +26,7 @@ The Azure MCP Server updates automatically by default whenever a new release com - Added validation for the Cosmos query command `azmcp_cosmos_database_container_item_query`.[[#524](https://github.com/microsoft/mcp/pull/524)] - Fixed the construction of Azure Resource Graph queries for App Configuration in the `FindAppConfigStore` method. The name filter is now correctly passed via the `additionalFilter` parameter instead of `tableName`, resolving "ExactlyOneStartingOperatorRequired" and "BadRequest" errors when setting key-value pairs. [[#670](https://github.com/microsoft/mcp/pull/670)] - Updated the description of the Monitor tool and corrected the prompt for command `monitor_healthmodels_entity_gethealth` to ensure that the LLM picks up the correct tool. [[#630](https://github.com/microsoft/mcp/pull/630)] -- Fixed BadRequest error in Azure Containter Registry to get a registry, and in EventHubs to get a namespace. [[#729](https://github.com/microsoft/mcp/pull/729)] +- Fixed BadRequest error in Azure Container Registry to get a registry, and in EventHubs to get a namespace. [[#729](https://github.com/microsoft/mcp/pull/729)] ### Other Changes