Edit

Azure MCP Server tools for Azure Advisor

The Azure MCP Server helps you manage Azure Advisor recommendations by using natural language prompts. You can apply, list, and summarize recommendations.

Azure Advisor is an Azure service that provides recommendations to help you optimize reliability, security, performance, operational excellence, and cost. For more information, see Azure Advisor documentation.

Note

Tool parameters: The Azure MCP Server tools define parameters for data they need to complete tasks. Some of these parameters are specific to each tool and are documented here. Other parameters are global and shared by all tools. For more information, see Tool parameters.

Recommendation: apply

Apply Azure Advisor recommendations to infrastructure-as-code (IaC) files, such as Azure Resource Manager templates and Terraform configurations. You provide an Azure resource type with --resource, and the tool returns the Advisor rules that you can apply to your IaC file to improve cost, performance, reliability, or security.

Example CLI command

azmcp advisor recommendation apply \
  --resource <resource>
Parameter Type Required Description
resource string Yes The Azure resource type for which to get rules to apply to an IaC file. Available options: aad_domainservices, apimanagement_service, cognitiveservices_accounts, compute_virtualmachines, compute_virtualmachinescalesets, containerregistry_registries, containerservice_managedclusters, dbforpostgresql_flexibleservers, documentdb_databaseaccounts, keyvault_vaults, kubernetes_connectedclusters, kubernetesconfiguration_extensions, netapp_volumes, network_applicationgatewaywebapplicationfirewallpolicies, network_expressrouteports, network_frontdoorwebapplicationfirewallpolicies, sql_managedinstances, storage_storageaccounts, web_serverfarms, web_staticsites

Tool annotation hints:

Destructive Idempotent Open World Read Only Secret Local Required

Recommendation: list

Retrieve individual Azure Advisor recommendation records, one row per recommendation, for a subscription. You receive only active recommendations with status New. Dismissed and postponed recommendations are excluded. Use filters for category, impact, resource type, resource, and search to narrow results. The top parameter caps the number of returned items; it defaults to 50 and has a maximum of 100. Results are capped at 100 items and might undercount when you need full-population aggregates or counts.

Example CLI command

azmcp advisor recommendation list \
  [--resource-group <resource-group>] \
  [--category <category>] \
  [--impact <impact>] \
  [--resource-type <resource-type>] \
  [--resource <resource>] \
  [--search <search>] \
  [--top <top>]
Parameter Type Required Description
category string No Filter recommendations by category (for example, Security, Cost, Performance, HighAvailability, OperationalExcellence). Case-insensitive exact match.
impact string No Filter recommendations by business impact (High, Medium, or Low). Case-insensitive exact match.
resource string No Filter recommendations by impacted resource name or full ARM resource ID. Case-insensitive substring match.
resource-type string No Filter recommendations by impacted Azure resource type (for example, Microsoft.Storage/storageAccounts). Case-insensitive exact match.
search string No Free-text filter applied to the recommendation problem text (case-insensitive substring match). Use this whenever the user's request includes a topical phrase such as 'related to Microsoft Foundry', 'about encryption', 'mentioning right-size', or 'for Key Vault'. Extract the salient noun(s) from the phrase (for example, Foundry, encrypt, right-size, Key Vault) and pass them here.
top string No Maximum number of items to return. For list: defaults to 50, clamped to 1-100 (server-side limit). For summary: optional display cap on the number of buckets returned (defaults to all). TotalRecommendations always reflects the complete filtered population regardless of top.
resource-group string No The name of the Azure resource group. The resource group is a logical container for Azure resources.

Tool annotation hints:

Destructive Idempotent Open World Read Only Secret Local Required

Recommendation: summary

Aggregates Azure Advisor recommendations and returns per-bucket counts and a true total. The tool answers count, ranking, and distribution questions over your active recommendations, such as "how many", "top N", "which X has the most", "breakdown by field", "distribution of", and "count of" queries.

Example CLI command

azmcp advisor recommendation summary \
  [--resource-group <resource-group>] \
  [--group-by <group-by>] \
  [--top <top>] \
  [--category <category>] \
  [--impact <impact>] \
  [--resource-type <resource-type>] \
  [--resource <resource>] \
  [--search <search>]
Parameter Type Required Description
category string No Filter recommendations by category (for example, Security, Cost, Performance, HighAvailability, OperationalExcellence). Case-insensitive exact match.
group-by string No Optional field to group the summary by. One of: recommendation-type, category, impact, resource-type. Defaults to category when omitted, which surfaces the high-level themes (Cost, Security, Reliability, and more) so prompts like 'summarize the key themes from my Advisor recommendations' work without naming a field.
impact string No Filter recommendations by business impact (High, Medium, or Low). Case-insensitive exact match.
resource string No Filter recommendations by impacted resource name or full ARM resource ID. Case-insensitive substring match.
resource-type string No Filter recommendations by impacted Azure resource type (for example, Microsoft.Storage/storageAccounts). Case-insensitive exact match.
search string No Free-text filter applied to the recommendation problem text (case-insensitive substring match). Use this whenever the user's request includes a topical phrase such as 'related to Microsoft Foundry', 'about encryption', 'mentioning right-size', or 'for Key Vault'. Extract the salient noun(s) from the phrase (for example, Foundry, encrypt, right-size, Key Vault) and pass them here.
top string No Maximum number of items to return. For list: defaults to 50, clamped to 1-100 (server-side limit). For summary: optional display cap on the number of buckets returned (defaults to all). TotalRecommendations always reflects the complete filtered population regardless of top.
resource-group string No The name of the Azure resource group. The resource group is a logical container for Azure resources.

Tool annotation hints:

Destructive Idempotent Open World Read Only Secret Local Required

Recommendation type: list

List the catalog of Azure Advisor recommendation types. Results include the recommendation category, impact, targeted resource type, and subcategory. Results sort by impact (High, Medium, Low), so the most important recommendations appear first.

Example CLI command

azmcp advisor recommendation-type list \
  [--resource-type <resource-type>] \
  [--impact <impact>] \
  [--category <category>]
Parameter Type Required Description
category string No Optional Advisor category filter. Typical values: Cost, HighAvailability, Security, Performance, OperationalExcellence (case-insensitive). New categories to be supported by Advisor in the future will still match.
impact string No Optional impact level filter. Allowed values: High, Medium, Low (case-insensitive). When omitted, results contain all impact levels but are still sorted High, Medium, Low.
resource-type string No Optional Azure resource type to narrow results to (for example, microsoft.compute/virtualmachines, microsoft.sql/servers). Matched case-insensitively against the supportedResourceType field on each recommendation type. Use this parameter when onboarding a new resource type to see only the recommendations Advisor generates for it.

Tool annotation hints:

Destructive Idempotent Open World Read Only Secret Local Required