From 180d037b6bc131fb59a07f5ea5edf15942ac912d Mon Sep 17 00:00:00 2001 From: Karishma Ghiya Date: Tue, 21 Jul 2026 17:37:23 -0700 Subject: [PATCH 1/3] Fix azqr tool selection for compliance prompts (#2819) Improve the Azure Quick Review (azqr) tool, extension namespace, and consolidated tool descriptions so prompts asking to scan a subscription for compliance issues or compliance recommendations reliably select the extension_azqr tool in All and Namespace modes. The descriptions now mirror user phrasing and explicitly disambiguate azqr from Azure Policy and Azure Advisor, which previously out-ranked it for these prompts. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ee38628b-51ed-4861-91e1-7a07f3b5360b --- .../ToolDescriptionEvaluator/prompts/namespace-tools.json | 2 +- .../karishmaghiya-fix-azqr-tool-selection.yaml | 3 +++ servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | 2 +- tools/Azure.Mcp.Tools.Extension/src/Commands/AzqrCommand.cs | 2 +- tools/Azure.Mcp.Tools.Extension/src/ExtensionSetup.cs | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 servers/Azure.Mcp.Server/changelog-entries/karishmaghiya-fix-azqr-tool-selection.yaml diff --git a/eng/tools/ToolDescriptionEvaluator/prompts/namespace-tools.json b/eng/tools/ToolDescriptionEvaluator/prompts/namespace-tools.json index 12fe3519bb..bc936345f4 100644 --- a/eng/tools/ToolDescriptionEvaluator/prompts/namespace-tools.json +++ b/eng/tools/ToolDescriptionEvaluator/prompts/namespace-tools.json @@ -323,7 +323,7 @@ { "id": "", "name": "extension_azqr", - "description": "Runs Azure Quick Review CLI (azqr) commands to generate compliance/security reports for Azure resources.\r\nThis tool should be used when the user wants to identify any non-compliant configurations or areas for improvement in their Azure resources.\r\nRequires a subscription id and optionally a resource group name. Returns the generated report file's path.\r\nNote that Azure Quick Review CLI (azqr) is different from Azure CLI (az).", + "description": "Runs Azure Quick Review CLI (azqr) to scan an Azure subscription (or resource group) for compliance issues and provide compliance recommendations. Generates a compliance and security assessment report that identifies non-compliant configurations and recommends improvements for your Azure resources. Use this whenever a user wants to scan, check, review, or assess a subscription for compliance issues or compliance recommendations, or wants recommendations to fix compliance and security problems. Requires a subscription id and optionally a resource group name. Returns the generated report file path. Note: azqr performs compliance and security scans and is different from Azure CLI (az), from Azure Policy assignments, and from Azure Advisor cost, performance, and reliability recommendations.", "command": "extension azqr" }, { diff --git a/servers/Azure.Mcp.Server/changelog-entries/karishmaghiya-fix-azqr-tool-selection.yaml b/servers/Azure.Mcp.Server/changelog-entries/karishmaghiya-fix-azqr-tool-selection.yaml new file mode 100644 index 0000000000..abf5bae9b7 --- /dev/null +++ b/servers/Azure.Mcp.Server/changelog-entries/karishmaghiya-fix-azqr-tool-selection.yaml @@ -0,0 +1,3 @@ +changes: + - section: "Bugs Fixed" + description: "Improved the Azure Quick Review (azqr) tool, extension namespace, and consolidated tool descriptions so that prompts asking to scan a subscription for compliance issues or compliance recommendations reliably select the `extension_azqr` tool in All and Namespace modes." diff --git a/servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json b/servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json index 78163706e7..348e00f77b 100644 --- a/servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json +++ b/servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json @@ -719,7 +719,7 @@ }, { "name": "audit_azure_resources_compliance", - "description": "Generate compliance and security audit reports for Azure resources using Azure Quick Review (azqr).", + "description": "Scan an Azure subscription (or resource group) for compliance issues and provide compliance recommendations using Azure Quick Review (azqr). Generates a compliance and security assessment report identifying non-compliant configurations and recommending improvements. Use this to scan, check, review, or assess a subscription for compliance issues or compliance recommendations. Distinct from Azure Policy assignments and Azure Advisor cost/performance/reliability recommendations.", "toolMetadata": { "destructive": { "value": false, diff --git a/tools/Azure.Mcp.Tools.Extension/src/Commands/AzqrCommand.cs b/tools/Azure.Mcp.Tools.Extension/src/Commands/AzqrCommand.cs index dc47415478..fffb7e0300 100644 --- a/tools/Azure.Mcp.Tools.Extension/src/Commands/AzqrCommand.cs +++ b/tools/Azure.Mcp.Tools.Extension/src/Commands/AzqrCommand.cs @@ -20,7 +20,7 @@ namespace Azure.Mcp.Tools.Extension.Commands; Id = "e7ef18a3-2730-4300-bad3-dc766f47dd2a", Name = "azqr", Title = "Azure Quick Review CLI Command", - Description = "Runs Azure Quick Review CLI (azqr) commands to generate compliance and security reports for Azure resources, identifying non-compliant configurations or areas for improvement. Requires a subscription id and optionally a resource group name. Returns the generated report file path. Note: azqr is different from Azure CLI (az).", + Description = "Runs Azure Quick Review CLI (azqr) to scan an Azure subscription (or resource group) for compliance issues and provide compliance recommendations. Generates a compliance and security assessment report that identifies non-compliant configurations and recommends improvements for your Azure resources. Use this whenever a user wants to scan, check, review, or assess a subscription for compliance issues or compliance recommendations, or wants recommendations to fix compliance and security problems. Requires a subscription id and optionally a resource group name. Returns the generated report file path. Note: azqr performs compliance and security scans and is different from Azure CLI (az), from Azure Policy assignments, and from Azure Advisor cost, performance, and reliability recommendations.", Destructive = false, Idempotent = true, OpenWorld = false, diff --git a/tools/Azure.Mcp.Tools.Extension/src/ExtensionSetup.cs b/tools/Azure.Mcp.Tools.Extension/src/ExtensionSetup.cs index 7aca179789..6565789ff4 100644 --- a/tools/Azure.Mcp.Tools.Extension/src/ExtensionSetup.cs +++ b/tools/Azure.Mcp.Tools.Extension/src/ExtensionSetup.cs @@ -34,7 +34,7 @@ public CommandGroup RegisterCommands(IServiceProvider serviceProvider) bool exposeExternalProcessCommands = ShouldExposeExternalProcessCommands(serviceProvider); string description = exposeExternalProcessCommands - ? "Extension commands for CLI tooling related to Azure. Includes running Azure Quick Review (azqr) for compliance reports, generating Azure CLI commands from user intent, and providing installation instructions for Azure CLI (az), Azure Developer CLI (azd), and Azure Functions Core Tools (func)." + ? "Extension commands for CLI tooling related to Azure. Includes running Azure Quick Review (azqr) to scan a subscription for compliance issues and generate compliance and security reports with compliance recommendations, generating Azure CLI commands from user intent, and providing installation instructions for Azure CLI (az), Azure Developer CLI (azd), and Azure Functions Core Tools (func)." : "Extension commands for CLI tooling related to Azure. Includes generating Azure CLI commands from user intent and providing installation instructions for Azure CLI (az), Azure Developer CLI (azd), and Azure Functions Core Tools (func)."; var extension = new CommandGroup(Name, description, Title); From 0a9f9ddaf65b0e1738b220ea18b99fdde2ae5be7 Mon Sep 17 00:00:00 2001 From: KarishmaGhiya Date: Wed, 22 Jul 2026 12:31:37 -0700 Subject: [PATCH 2/3] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json b/servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json index 348e00f77b..c8362a0f74 100644 --- a/servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json +++ b/servers/Azure.Mcp.Server/src/Resources/consolidated-tools.json @@ -719,7 +719,7 @@ }, { "name": "audit_azure_resources_compliance", - "description": "Scan an Azure subscription (or resource group) for compliance issues and provide compliance recommendations using Azure Quick Review (azqr). Generates a compliance and security assessment report identifying non-compliant configurations and recommending improvements. Use this to scan, check, review, or assess a subscription for compliance issues or compliance recommendations. Distinct from Azure Policy assignments and Azure Advisor cost/performance/reliability recommendations.", + "description": "Scan an Azure subscription (or resource group) for compliance issues and provide compliance recommendations using Azure Quick Review (azqr). Generates a compliance and security assessment report identifying non-compliant configurations and recommending improvements. Use this to scan, check, review, or assess a subscription for compliance issues or compliance recommendations. Distinct from Azure Policy assignments and Azure Advisor recommendations for cost, security, reliability, operational excellence, and performance improvements.", "toolMetadata": { "destructive": { "value": false, From 87bf98b293ab9f2c5771d6537f0272fbdd585276 Mon Sep 17 00:00:00 2001 From: Karishma Ghiya Date: Tue, 4 Aug 2026 11:01:01 -0700 Subject: [PATCH 3/3] update --- eng/tools/ToolDescriptionEvaluator/prompts/namespace-tools.json | 2 +- tools/Azure.Mcp.Tools.Extension/src/Commands/AzqrCommand.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/tools/ToolDescriptionEvaluator/prompts/namespace-tools.json b/eng/tools/ToolDescriptionEvaluator/prompts/namespace-tools.json index bc936345f4..9c6037b6df 100644 --- a/eng/tools/ToolDescriptionEvaluator/prompts/namespace-tools.json +++ b/eng/tools/ToolDescriptionEvaluator/prompts/namespace-tools.json @@ -323,7 +323,7 @@ { "id": "", "name": "extension_azqr", - "description": "Runs Azure Quick Review CLI (azqr) to scan an Azure subscription (or resource group) for compliance issues and provide compliance recommendations. Generates a compliance and security assessment report that identifies non-compliant configurations and recommends improvements for your Azure resources. Use this whenever a user wants to scan, check, review, or assess a subscription for compliance issues or compliance recommendations, or wants recommendations to fix compliance and security problems. Requires a subscription id and optionally a resource group name. Returns the generated report file path. Note: azqr performs compliance and security scans and is different from Azure CLI (az), from Azure Policy assignments, and from Azure Advisor cost, performance, and reliability recommendations.", + "description": "Runs Azure Quick Review CLI (azqr) to scan an Azure subscription (or resource group) for compliance issues and provide compliance recommendations. Generates a compliance and security assessment report that identifies non-compliant configurations and recommends improvements for your Azure resources. Use this whenever a user wants to scan, check, review, or assess a subscription for compliance issues or compliance recommendations, or wants recommendations to fix compliance and security problems. Requires a subscription (ID or name) and optionally a resource group. Returns the generated report file paths (XLSX and JSON). Note: azqr performs compliance and security scans and is different from Azure CLI (az), from Azure Policy assignments, and from Azure Advisor recommendations for cost, security, reliability, operational excellence, and performance improvements.", "command": "extension azqr" }, { diff --git a/tools/Azure.Mcp.Tools.Extension/src/Commands/AzqrCommand.cs b/tools/Azure.Mcp.Tools.Extension/src/Commands/AzqrCommand.cs index fffb7e0300..eedaba4490 100644 --- a/tools/Azure.Mcp.Tools.Extension/src/Commands/AzqrCommand.cs +++ b/tools/Azure.Mcp.Tools.Extension/src/Commands/AzqrCommand.cs @@ -20,7 +20,7 @@ namespace Azure.Mcp.Tools.Extension.Commands; Id = "e7ef18a3-2730-4300-bad3-dc766f47dd2a", Name = "azqr", Title = "Azure Quick Review CLI Command", - Description = "Runs Azure Quick Review CLI (azqr) to scan an Azure subscription (or resource group) for compliance issues and provide compliance recommendations. Generates a compliance and security assessment report that identifies non-compliant configurations and recommends improvements for your Azure resources. Use this whenever a user wants to scan, check, review, or assess a subscription for compliance issues or compliance recommendations, or wants recommendations to fix compliance and security problems. Requires a subscription id and optionally a resource group name. Returns the generated report file path. Note: azqr performs compliance and security scans and is different from Azure CLI (az), from Azure Policy assignments, and from Azure Advisor cost, performance, and reliability recommendations.", + Description = "Runs Azure Quick Review CLI (azqr) to scan an Azure subscription (or resource group) for compliance issues and provide compliance recommendations. Generates a compliance and security assessment report that identifies non-compliant configurations and recommends improvements for your Azure resources. Use this whenever a user wants to scan, check, review, or assess a subscription for compliance issues or compliance recommendations, or wants recommendations to fix compliance and security problems. Requires a subscription (ID or name) and optionally a resource group. Returns the generated report file paths (XLSX and JSON). Note: azqr performs compliance and security scans and is different from Azure CLI (az), from Azure Policy assignments, and from Azure Advisor recommendations for cost, security, reliability, operational excellence, and performance improvements." Destructive = false, Idempotent = true, OpenWorld = false,