Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure Model Context Protocol (MCP) Server tools help you manage Azure Optimization resources with natural language prompts. You can get recommendations, compare alternatives, and explain recommendations.
Azure Optimization uses Azure Advisor recommendations to help you identify cost-saving opportunities and compare compute resize options.
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.
Alternatives recommendation
Retrieves alternative compute resize recommendations—other SKUs, series, or sizes beyond the primary recommendation—for an Azure virtual machine (VM) or virtual machine scale set (VMSS). Use optional inclusion and exclusion filters to narrow proposed SKUs, VM series, and processor types. Provide the full Azure Resource Manager resource ID. If you only have the resource name, look up the resource ID before running the tool. Provide a subscription name or ID. The tool resolves a subscription name to its ID. Returns a markdown comparison table and parsed alternatives. Presents alternatives as an ordered comparison table and explains tradeoffs among estimated savings, cores, SKU, VM series, and processor. The output doesn't include raw JSON.
Example CLI command
azmcp optimization recommendation alternatives \
--resource-id <resource-id> \
[--new-skus <new-skus>] \
[--new-vm-series <new-vm-series>] \
[--new-processor-types <new-processor-types>] \
[--exclude-skus <exclude-skus>] \
[--exclude-vm-series <exclude-vm-series>] \
[--exclude-processor-types <exclude-processor-types>]
| Parameter | Type | Required | Description |
|---|---|---|---|
resource-id |
string | Yes | Full Azure ARM resource ID of the VM or VM Scale Set, for example, /subscriptions/<subId>/resourceGroups/<rg>/providers/Microsoft.Compute/virtualMachines/<name>. You can pass either the impacted resource ID or the Advisor recommendation ID (the /providers/Microsoft.Advisor/... suffix is stripped automatically). Use the resourceId or id field from the list tool output. |
new-skus |
string | No | Only include proposals whose new SKU matches any of these (comma or semicolon separated, for example, Standard_D4s_v5, Standard_E4s_v5). |
new-vm-series |
string | No | Only include proposals whose new VM series matches any of these (comma or semicolon separated, for example, Dsv5, Esv5). |
new-processor-types |
string | No | Only include proposals whose new processor type matches any of these (for example, Intel, AMD). |
exclude-skus |
string | No | Exclude proposals whose new SKU matches any of these. |
exclude-vm-series |
string | No | Exclude proposals whose new VM series matches any of these. |
exclude-processor-types |
string | No | Exclude proposals whose new processor type matches any of these. |
| Destructive | Idempotent | Open World | Read Only | Secret | Local Required |
|---|---|---|---|---|---|
| ❌ | ✅ | ❌ | ✅ | ❌ | ❌ |
Explain recommendation
Explains a specific Azure Advisor cost and right-size recommendation for a resource, and returns its utilization time series that a client can render as an inline chart. Common prompts include "explain recommendation N", "explain this recommendation", "tell me more about recommendation N", "why is this recommended", and "go deeper on" a recommendation after listing recommendations with the list tool. Provide the resource ID from the corresponding row returned by the list tool. Provide the subscription name or ID; names resolve to IDs automatically.
Example CLI command
azmcp optimization recommendation explain \
--resource-id <resource-id> \
[--target-sku <target-sku>] \
[--view <view>]
| Parameter | Type | Required | Description |
|---|---|---|---|
resource-id |
string | Yes | Full Azure ARM resource ID of the VM or VM Scale Set, for example, /subscriptions/<subId>/resourceGroups/<rg>/providers/Microsoft.Compute/virtualMachines/<name>. You can pass either the impacted resource ID or the Advisor recommendation ID (the /providers/Microsoft.Advisor/... suffix is stripped automatically). Use the resourceId or id field from the list tool output. |
target-sku |
string | No | Optional target Azure VM SKU to compare against the current SKU, for example, Standard_E2as_v5. When omitted, only the current utilization is returned (no target configuration or projected target series). Set this parameter only when you explicitly name a SKU to project against. |
view |
string | No | Which utilization views to return: Detail (default, 7-day / 30-minute maximum), Trend (7-day / 6-hour), or Both. Only set Trend or Both when you explicitly request longer-term data. |
| Destructive | Idempotent | Open World | Read Only | Secret | Local Required |
|---|---|---|---|---|---|
| ❌ | ✅ | ❌ | ✅ | ❌ | ❌ |
Get recommendations
Gets Azure cost-saving and cost-optimization recommendations for a subscription. Ranks recommendations by impact and by currency-normalized annual savings. Runs a curated Azure Resource Graph query over Azure Advisor cost recommendations.
Example CLI command
azmcp optimization recommendation list \
[--top <top>]
| Parameter | Type | Required | Description |
|---|---|---|---|
top |
string | No | Maximum number of cost-saving recommendations to return (1-1000, default 100). Results are ranked by impact then currency-normalized annual savings. |
| Destructive | Idempotent | Open World | Read Only | Secret | Local Required |
|---|---|---|---|---|---|
| ❌ | ✅ | ❌ | ✅ | ❌ | ❌ |