You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`azure__get_azure_bestpractices`| Get Azure best practices |`intent` (Required): optimization context | Inform query design with cost management best practices |
43
-
|`azure__extension_azqr`| Run Azure Quick Review compliance scan |`subscription` (Required): subscription ID, `resource-group` (Optional): resource group name | Find orphaned resources and cost optimization opportunities |
44
-
|`azure__aks`| Azure Kubernetes Service operations | varies by sub-command | AKS cost analysis: list clusters, get node pools, inspect configuration |
45
-
46
-
> 💡 **Tip:** Prefer MCP tools over direct CLI commands. Use `az rest` only when MCP tools don't cover the specific operation.
47
-
48
-
---
49
-
50
-
## Routing
51
-
52
-
Read the user's request and follow the appropriate workflow below.
53
-
54
-
| User Intent | Workflow | Example Prompts |
55
-
|-------------|----------|-----------------|
56
-
| Understand current costs |[Cost Query Workflow](cost-query/workflow.md)| "how much am I spending", "cost by service", "show my bill" |
> 💡 **Tip:** These are scope paths only — not complete URLs. Combine with the API endpoint and version.
76
-
77
-
---
78
-
79
-
## Part 1: Cost Query Workflow
80
-
81
-
For the full cost query workflow (scope selection, report types, timeframes, dataset configuration, API calls, pagination, guardrails, examples, and error handling), see:
For the full cost forecast workflow (scope selection, time period rules, dataset configuration, forecast-specific options, API calls, response interpretation, guardrails, and error handling), see:
-**ACTUAL DATA** = Retrieved from Azure Cost Management API
106
-
-**ACTUAL METRICS** = Retrieved from Azure Monitor
107
-
-**VALIDATED PRICING** = Retrieved from official Azure pricing pages
108
-
-**ESTIMATED SAVINGS** = Calculated based on actual data and validated pricing
109
-
110
-
## Best Practices
111
-
112
-
- Always query actual costs first — never estimate or assume
113
-
- Always present the total bill alongside optimization recommendations
114
-
- Validate pricing from official sources — account for free tiers
115
-
- Use REST API for cost queries (more reliable than `az costmanagement query`)
116
-
- Always include the `ClientType: GitHubCopilotForAzure` header on all Cost Management API requests (`--headers "ClientType=GitHubCopilotForAzure"` in `az rest`)
117
-
- Save audit trail — include all queries and responses
118
-
- Include Azure Portal links for all resources
119
-
- For costs < $10/month, emphasize operational improvements over financial savings
120
-
- Never execute destructive operations without explicit approval
121
-
- On 429 responses, check all `x-ms-ratelimit-microsoft.costmanagement-*-retry-after` headers (`qpu-retry-after`, `entity-retry-after`, `tenant-retry-after`), wait for the longest value, and do not retry until that duration has elapsed. The per-scope limit (4 requests/minute) is the most restrictive.
0 commit comments