Skip to main content
Glama
bigonil

Azure Cost Management MCP

by bigonil

Azure Cost Management MCP Server

MCP (Model Context Protocol) server per l'integrazione con le API di Azure Cost Management, allineato alle linee guida WAF Cost Optimization e CAF (Cloud Adoption Framework) di Microsoft.

Compatibile con GitHub Copilot Chat, Claude Desktop, e qualsiasi client MCP.


Indice


Related MCP server: Azure Pricing MCP Server

Prerequisiti

Requisito

Versione minima

Node.js

18.0.0

npm

9.x

Azure CLI (az)

qualsiasi — solo per autenticazione locale


Installazione

cd azure-cost-management-mcp
npm install
npm run build

Il server compilato sarà disponibile in dist/index.js.


Autenticazione Azure

Il server usa DefaultAzureCredential dall'SDK @azure/identity, che tenta automaticamente le seguenti modalità in ordine:

Opzione A — Azure CLI (sviluppo locale, consigliata)

az login
# oppure, per un tenant specifico:
az login --tenant <TENANT_ID>

Nessuna variabile d'ambiente necessaria. Il server rileva il token CLI in modo automatico.

Opzione B — Service Principal (CI/CD, automazione)

Imposta le seguenti variabili d'ambiente (vedi .env.example):

AZURE_TENANT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
AZURE_CLIENT_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
AZURE_CLIENT_SECRET=your-client-secret
AZURE_SUBSCRIPTION_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx  # default subscription

Opzione C — Managed Identity (workload ospitati su Azure)

Nessuna configurazione. DefaultAzureCredential rileva l'identità gestita tramite IMDS in modo automatico.


Configurazione IDE

VS Code + GitHub Copilot Chat

Metodo 1 — File .vscode/mcp.json nel workspace (consigliato)

Crea o modifica il file <cartella-workspace>/.vscode/mcp.json:

{
  "servers": {
    "azure-cost-management": {
      "type": "stdio",
      "command": "node",
      "args": ["${userHome}/azure-cost-management-mcp/dist/index.js"],
      "env": {
        "AZURE_SUBSCRIPTION_ID": "${env:AZURE_SUBSCRIPTION_ID}"
      }
    }
  }
}

Se usi az login, la sezione env può rimanere vuota — DefaultAzureCredential usa il token CLI. Per Service Principal aggiungi AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET.

Metodo 2 — Settings utente VS Code (globale)

Apri Ctrl+Shift+PPreferences: Open User Settings (JSON) e aggiungi:

{
  "mcp.servers": {
    "azure-cost-management": {
      "type": "stdio",
      "command": "node",
      "args": ["C:/Users/<TUO_UTENTE>/azure-cost-management-mcp/dist/index.js"]
    }
  }
}

Verifica connessione in VS Code:

  1. Apri il pannello GitHub Copilot Chat (Ctrl+Alt+I)

  2. Seleziona modalità Agent (@)

  3. Scrivi: @azure-cost-management qual è la spesa del mese corrente per la subscription xxx?


Claude Desktop

Modifica il file di configurazione di Claude Desktop:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "azure-cost-management": {
      "command": "node",
      "args": ["C:/Users/<TUO_UTENTE>/azure-cost-management-mcp/dist/index.js"],
      "env": {
        "AZURE_SUBSCRIPTION_ID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      }
    }
  }
}

Riavvia Claude Desktop dopo la modifica.


Cursor

Crea o modifica .cursor/mcp.json nella home utente oppure nella cartella del progetto:

{
  "mcpServers": {
    "azure-cost-management": {
      "command": "node",
      "args": ["C:/Users/<TUO_UTENTE>/azure-cost-management-mcp/dist/index.js"],
      "env": {
        "AZURE_SUBSCRIPTION_ID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      }
    }
  }
}

Windsurf

Modifica ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "azure-cost-management": {
      "command": "node",
      "args": ["C:/Users/<TUO_UTENTE>/azure-cost-management-mcp/dist/index.js"],
      "env": {
        "AZURE_SUBSCRIPTION_ID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      }
    }
  }
}

Riferimento Scope

Tutti i tool accettano un parametro scope che identifica il livello Azure su cui operare.

Formato

Esempio

Scope risultante

Path completo

/subscriptions/aaaa-bbbb

Subscription

Path completo

/subscriptions/aaaa/resourceGroups/my-rg

Resource Group

UUID nudo

aaaa-bbbb-cccc-dddd-eeee

Subscription

sub:{id}

sub:aaaa-bbbb

Subscription

sub:{id}/rg:{name}

sub:aaaa/rg:my-rg

Resource Group

rg:{name}

rg:my-rg

RG nella subscription default (AZURE_SUBSCRIPTION_ID)

mg:{id}

mg:my-management-group

Management Group (CAF enterprise)

ba:{id}

ba:12345678

Billing Account (EA/MCA)

ba:{id}/bp:{id}

ba:12345/bp:ABCD

Billing Profile (MCA)

CAF tip: usa mg: per analisi cross-subscription su tutti i landing zone senza dover iterare su ogni subscription singolarmente.


Tool disponibili

azure_cost_query

Interroga i costi effettivi o ammortizzati per uno scope Azure con raggruppamento e filtri temporali.

Parametri:

Parametro

Tipo

Default

Descrizione

scope

string

Scope Azure (vedi Riferimento Scope)

type

ActualCost | AmortizedCost

ActualCost

ActualCost: addebiti pay-as-you-go. AmortizedCost: include l'ammortamento di Reserved Instances e Savings Plans

timeframe

enum

MonthToDate

Finestra temporale: BillingMonth, MonthToDate, TheLastMonth, TheLastBillingMonth, WeekToDate, Custom

from

string (ISO 8601)

Data inizio (solo con timeframe=Custom)

to

string (ISO 8601)

Data fine (solo con timeframe=Custom)

granularity

None | Daily | Monthly

None

None=totale unico, Daily=trend giornaliero, Monthly=riepilogo mensile

groupBy

string[]

[]

Dimensioni per il raggruppamento (vedi esempi sotto)

top

integer (1-1000)

100

Numero massimo di righe restituite

Valori comuni per groupBy:

ResourceGroup       ServiceName         ResourceType
Location            SubscriptionName    MeterCategory
MeterSubCategory    ChargeType
tag:CostCenter      tag:Environment     tag:Application

azure_cost_forecast

Restituisce le previsioni di spesa basate sui trend di utilizzo correnti.

Parametri:

Parametro

Tipo

Default

Descrizione

scope

string

Scope Azure

from

string (ISO 8601)

Data inizio previsione

to

string (ISO 8601)

Data fine previsione

granularity

Daily | Monthly

Monthly

Granularità della previsione

includeActualCost

boolean

true

Includi i costi reali per confronto con la previsione


azure_cost_dimensions

Elenca le dimensioni disponibili per raggruppamento e filtro allo scope indicato. Da usare prima di azure_cost_query per scoprire i valori validi di groupBy.

Parametri:

Parametro

Tipo

Descrizione

scope

string

Scope Azure


azure_cost_alerts

Elenca gli alert di costo attivi per uno scope: sforamenti budget, avvisi credito, violazioni quota, anomalie.

Parametri:

Parametro

Tipo

Descrizione

scope

string

Scope Azure

Risposta — campi principali:

{
  "total": 2,
  "active": 1,
  "alerts": [
    {
      "name": "alert-xxx",
      "definitionType": "Budget",
      "definitionCategory": "Cost",
      "status": "Active",
      "creationTime": "2024-01-15T10:30:00Z"
    }
  ]
}

azure_budget_list

Elenca tutti i budget di costo allo scope con la spesa corrente, le soglie e lo stato.

Parametri:

Parametro

Tipo

Descrizione

scope

string

Scope Azure (richiede subscription)

Stati possibili nel campo status:

Status

Significato

OK

Spesa < 80% del budget

WARNING

Spesa tra 80% e 90%

CRITICAL

Spesa tra 90% e 100%

EXCEEDED

Spesa > 100% del budget


azure_budget_get

Recupera i dettagli completi di un budget specifico: spesa corrente, spesa prevista, soglie di notifica e filtri.

Parametri:

Parametro

Tipo

Descrizione

scope

string

Scope Azure

budgetName

string

Nome del budget


azure_budget_create

Crea o aggiorna un budget di costo con le soglie di alert raccomandate da WAF. Se esiste già un budget con lo stesso nome nello stesso scope, verrà aggiornato.

Parametri:

Parametro

Tipo

Default

Descrizione

scope

string

Scope Azure (richiede subscription)

name

string

Nome univoco del budget nello scope

amount

number

Importo del budget nella valuta della subscription

timeGrain

enum

Monthly

Periodo di reset: Monthly, Quarterly, Annually, BillingMonth, BillingQuarter, BillingAnnually

startDate

string (YYYY-MM-DD)

Data inizio. Per grain Monthly deve essere il primo del mese

endDate

string (YYYY-MM-DD)

+10 anni

Data fine (opzionale)

contactEmails

string[]

[]

Email da notificare al raggiungimento delle soglie

contactRoles

string[]

["Owner","Contributor"]

Ruoli RBAC da notificare

notifyAt80Percent

boolean

true

Alert WAF: avviso anticipato all'80% della spesa effettiva

notifyAt100Percent

boolean

true

Alert WAF: budget raggiunto al 100% della spesa effettiva

notifyForecastAt100Percent

boolean

true

Alert WAF: previsione che raggiungerà il 100% prima della fine del periodo


azure_budget_delete

Elimina permanentemente un budget. L'operazione non è reversibile.

Parametri:

Parametro

Tipo

Descrizione

scope

string

Scope Azure

budgetName

string

Nome del budget da eliminare


azure_advisor_recommendations

Recupera le raccomandazioni di Azure Advisor per la categoria Cost Optimization.

Copre: ridimensionamento VM sottoutilizzate, eliminazione risorse idle (dischi non collegati, IP pubblici inutilizzati), acquisto Reserved Instances o Savings Plans per workload prevedibili.

Parametri:

Parametro

Tipo

Default

Descrizione

scope

string

Scope a livello subscription (UUID, sub:{id}, o path completo)

impact

High | Medium | Low | All

All

Filtra per impatto. High = maggior risparmio potenziale

top

integer (1-500)

50

Numero massimo di raccomandazioni

Nota: Azure Advisor opera solo a livello di subscription. Lo scope mg: non è supportato per questo tool.


Esempi d'uso in chat

Questi esempi funzionano sia con GitHub Copilot Chat che con Claude Desktop, Cursor, e Windsurf.

Analisi spesa corrente

Mostrami la spesa del mese corrente per la subscription aaaa-bbbb-cccc,
raggruppata per ServiceName e ordinata per costo decrescente.
Qual è la spesa degli ultimi 3 mesi raggruppata per ResourceGroup?
Usa il periodo Custom da 2024-01-01 a 2024-03-31 con granularità Monthly.
Mostrami la ripartizione dei costi per tag:CostCenter e tag:Environment
nella subscription aaaa — voglio fare il chargeback ai team.

Previsioni e anomalie

Prevedi la spesa di marzo per la subscription aaaa.
Poi confronta con il budget esistente per capire se siamo a rischio sforamento.
Ci sono alert di costo attivi nella subscription aaaa?

Gestione budget

Elenca tutti i budget nella subscription aaaa con il loro stato attuale.
Crea un budget mensile da 5000 EUR per il resource group "prod-rg"
nella subscription aaaa, con notifiche a mario@example.com.
Il budget "monthly-prod" nella subscription aaaa è stato superato?
Mostrami i dettagli e la spesa prevista per fine mese.

Ottimizzazione costi (WAF/CAF)

Quali sono le raccomandazioni di Azure Advisor ad alto impatto
per la subscription aaaa? Voglio massimizzare i risparmi.
Fai un'analisi completa dei costi per il management group "my-mg":
spesa corrente per subscription, alert attivi, e raccomandazioni Advisor.
Quali dimensioni sono disponibili per il raggruppamento dei costi
nella subscription aaaa? Voglio capire su quali tag posso fare showback.

RBAC — Ruoli richiesti

Assegna i ruoli allo scope appropriato (subscription, resource group o management group):

Operazione

Ruolo minimo richiesto

Leggere costi, forecast, dimensioni, alert

Cost Management Reader

Leggere budget

Cost Management Reader

Creare/aggiornare/eliminare budget

Cost Management Contributor

Raccomandazioni Advisor

Reader (a livello subscription)

CAF enterprise: assegna i ruoli a livello di Management Group per coprire tutte le subscription dei landing zone con un'unica assegnazione.

# Esempio: assegnare Cost Management Reader al management group
az role assignment create \
  --role "Cost Management Reader" \
  --assignee <CLIENT_ID_O_UPN> \
  --scope /providers/Microsoft.Management/managementGroups/<MG_ID>

Architettura del codice

azure-cost-management-mcp/
├── src/
│   ├── index.ts              # Entry point MCP server, registrazione tool
│   ├── client.ts             # Client Azure singleton + helper scope/risposta
│   ├── tools/
│   │   ├── cost.ts           # azure_cost_query, forecast, dimensions, alerts
│   │   ├── budgets.ts        # azure_budget_list/get/create/delete
│   │   └── advisor.ts        # azure_advisor_recommendations
│   └── __tests__/
│       ├── client.test.ts    # Unit test: normalizeScope, transformRows, ecc.
│       └── server.integration.test.ts  # Integration test: protocollo MCP
├── dist/                     # Output compilato TypeScript (generato da npm run build)
├── package.json
├── tsconfig.json
└── .env.example

Dipendenze principali:

Pacchetto

Versione

Uso

@modelcontextprotocol/sdk

^1.27.1

Protocollo MCP, transport stdio

@azure/arm-costmanagement

1.0.0-beta.1

Query costi, forecast, dimensioni, alert

@azure/arm-consumption

^9.2.0

Gestione budget

@azure/arm-advisor

^3.2.0

Raccomandazioni Cost Optimization

@azure/identity

^4.13.1

DefaultAzureCredential (auth unificata)

zod

^3.23.0

Validazione input schema tool

Flusso architetturale:

GitHub Copilot / Claude / Cursor
         │ MCP (stdio)
         ▼
    src/index.ts  (McpServer + StdioServerTransport)
         │
    src/client.ts  (DefaultAzureCredential, singleton client, normalizeScope)
         │
    ┌────┼────────────────────┐
    ▼    ▼                    ▼
Azure Cost    Azure           Azure
Management    Consumption     Advisor
API           API (Budgets)   API

Sviluppo

# Avvia in watch mode (rebuild automatico al salvataggio)
npm run dev

# Verifica tipi senza compilare
npm run typecheck

# Build di produzione
npm run build

# Avvia il server compilato
npm start

# Esegui tutti i test (unit + integration)
npm test

# Solo unit test (client utilities)
npm run test:unit

# Solo integration test (protocollo MCP)
npm run test:integration

Test rapido del server:

# Verifica che il server si avvii e risponda al protocollo MCP
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' \
  | node dist/index.js

Lista tool registrati:

(
  echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
  echo '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}'
) | node dist/index.js

Available Tools

9 tools
azure_advisor_recommendationsAzure Advisor Cost RecommendationsA

Retrieves Azure Advisor cost optimization recommendations for a subscription. Covers: right-sizing underutilized VMs, deleting idle resources (unattached disks, unused IPs), purchasing reservations or savings plans for predictable workloads, and removing empty resource groups. WAF Cost Optimization: address High impact recommendations first for maximum savings. CAF FinOps: run across all landing zone subscriptions to enforce cost governance. Note: Advisor operates at subscription scope; management group scope is not supported.

ParametersJSON Schema
NameRequiredDescriptionDefault
topNoMaximum number of recommendations to return.
scopeYesSubscription scope: UUID, sub:{id}, or /subscriptions/{id}. Advisor requires subscription-level scope.
impactNoFilter by recommendation impact. High = largest potential savings. Start with High to maximize cost reduction effort.All

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the burden. It discloses the scope restriction (subscription only, not management group) and what types of recommendations are covered (unattached disks, unused IPs, etc.). It implies read-only behavior with 'Retrieves,' but does not disclose rate limits, authentication, or return format. Still, the scope and coverage details are valuable behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each earning its place: purpose, coverage scope, and usage/scope caveat. The description is front-loaded with the primary action and resource, and wastes no words. Structure is clear and scannable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity and lack of output schema, the description sufficiently covers what it does, when to use it (WAF/FinOps), and scope limitations. It stops short of describing pagination or response structure, but for a retrieval tool this is acceptable and covered by the parameter schema for top/limit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions for all three parameters, so the baseline is 3. The description adds meaningful context beyond the schema: it explains which recommendations are included (right-sizing, idle resources) and explicitly advises starting with High impact for maximum savings, reinforcing the impact parameter. This adds practical meaning to the parameter choices.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Retrieves' and the resource 'Azure Advisor cost optimization recommendations for a subscription.' It distinguishes from sibling tools like cost queries or forecasts by focusing specifically on Advisor recommendations and even lists example categories (right-sizing VMs, deleting idle resources).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance: 'WAF Cost Optimization: address High impact recommendations first' and 'CAF FinOps: run across all landing zone subscriptions.' It also sets a hard constraint by noting 'Advisor operates at subscription scope; management group scope is not supported.' However, it does not explicitly compare to alternatives like azure_cost_query or azure_cost_forecast, though the context makes the intended use clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

azure_budget_createAzure Budget Create or UpdateA

Creates or updates a cost budget with WAF-recommended alert thresholds. Default notifications: 80% actual, 100% actual, 100% forecasted — first line of defense against overruns. WAF Cost Optimization: always set both actual and forecasted alerts on every workload budget. CAF: align timeGrain with billing cycles; include Owner/Contributor in contactRoles for governance. If a budget with the same name already exists at the scope it will be updated in-place.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesUnique budget name within scope (e.g., 'monthly-sub-budget', 'prod-rg-budget').
scopeYesAzure scope: /subscriptions/{id}, /subscriptions/{id}/resourceGroups/{name}, sub:{id}, rg:{name}, mg:{managementGroupId}. CAF: set budgets at subscription level per landing zone, and at resource group level for workloads.
amountYesBudget amount in the subscription default currency.
endDateNoBudget end date (YYYY-MM-DD). Defaults to 10 years from start.
startDateYesBudget start date (YYYY-MM-DD). For Monthly grain must be the first day of a month.
timeGrainNoBudget reset period. Monthly aligns with calendar month. BillingMonth aligns with the Azure billing cycle.Monthly
contactRolesNoAzure RBAC roles to notify. CAF: Owner and Contributor ensure landing zone owners receive budget alerts without needing explicit email addresses.
contactEmailsNoEmail addresses to notify when alert thresholds are reached.
notifyAt80PercentNoWAF recommended: alert at 80% actual spend (early warning).
notifyAt100PercentNoWAF recommended: alert at 100% actual spend (budget reached).
notifyForecastAt100PercentNoWAF recommended: alert when forecast predicts 100% spend before month-end. Proactive warning before the budget is actually exceeded.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the burden of disclosing behavioral traits. It explicitly mentions defaults ('Default notifications: 80% actual, 100% actual, 100% forecasted'), the upsert behavior, and WAF/CAF best practices. However, it does not mention required RBAC permissions or potential side effects of overwriting an existing budget beyond 'updated in-place,' so it's not fully transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is informative but not excessively verbose. The first sentence is direct, and the WAF/CAF sentences provide useful guidance. The structure is logical (what → defaults → best practices → upsert behavior). It could be slightly tighter, but every sentence contributes to the tool's effective use.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 11 parameters and no output schema, the description covers the critical aspects: default thresholds, WAF/CAF alignment, and upsert semantics. It doesn't describe return values or error conditions, but the core behavioral context is well covered. Overall, it's complete enough for an agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all parameters. The description adds value by explaining WAF-recommended thresholds ('80% actual, 100% actual, 100% forecasted') and CAF guidance for timeGrain and contactRoles, giving semantic context beyond the raw schema. The in-place update note clarifies the combined behavior of name and scope.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Creates or updates a cost budget' with a specific verb and resource, distinguishing it from sibling tools like azure_budget_list and azure_budget_delete. It also explains the upsert behavior ('If a budget with the same name already exists at the scope it will be updated in-place'), making the purpose and behavior unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear WAF and CAF context, advising when to set actual and forecasted alerts ('always set both actual and forecasted alerts') and how to align timeGrain with billing cycles. It doesn't explicitly exclude alternatives, but the create/update scope is clear relative to siblings. The in-place update note also guides usage for existing budgets.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

azure_budget_deleteAzure Budget DeleteA

Permanently deletes a cost budget. This action cannot be undone.

ParametersJSON Schema
NameRequiredDescriptionDefault
scopeYesAzure scope: /subscriptions/{id}, /subscriptions/{id}/resourceGroups/{name}, sub:{id}, rg:{name}, mg:{managementGroupId}. CAF: set budgets at subscription level per landing zone, and at resource group level for workloads.
budgetNameYesName of the budget to delete.

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It explicitly states that deletion is 'Permanent' and 'cannot be undone,' which accurately conveys the destructive and irreversible nature of the operation. This goes beyond a simple 'deletes' statement, providing crucial risk awareness for the agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences that immediately convey the action and the key warning. Every word is purposeful, and the most critical information ('Permanently deletes') is front-loaded. This is a model of concise writing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description, combined with the fully detailed schema, provides adequate context for a simple delete operation. It covers the action and the irreversibility, which is the main caveat, and the parameters are well-documented in the schema. However, it does not mention potential side effects (e.g., impact on cost data) or response expectations, and there is no output schema to fill that gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% parameter description coverage, including detailed examples and context for 'scope' and a clear definition for 'budgetName'. The tool description adds no additional parameter semantics, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('deletes') and resource ('cost budget'), making the action unambiguous. It clearly distinguishes this tool from sibling tools like azure_budget_list, azure_budget_get, and azure_budget_create by indicating a destructive operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage (when you want to remove a budget) but does not explicitly state when to use this tool versus alternatives, nor does it mention any prerequisites or exclusions. The irreversibility warning serves as a caution, but there is no explicit 'when-to-use' or 'when-not-to-use' guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

azure_budget_getAzure Budget GetA

Retrieves full details of a specific budget including current and forecasted spend, all alert notification thresholds, and filter configuration.

ParametersJSON Schema
NameRequiredDescriptionDefault
scopeYesAzure scope: /subscriptions/{id}, /subscriptions/{id}/resourceGroups/{name}, sub:{id}, rg:{name}, mg:{managementGroupId}. CAF: set budgets at subscription level per landing zone, and at resource group level for workloads.
budgetNameYesName of the budget to retrieve.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden. It explicitly states this is a retrieval operation and enumerates the exact data returned (spend, thresholds, filters), which is transparent. It does not, however, describe error cases or permissions, but the read-only nature is clear.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence with no filler; verb-first structure immediately conveys the action and scope of results.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 2-parameter GET tool with no output schema, the description sufficiently specifies what is returned and the target budget. No additional context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, with detailed descriptions for both parameters, especially scope which includes CAF guidance. The tool description itself adds no parameter-specific meaning, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Retrieves') and identifies the resource ('a specific budget') and the details returned ('current and forecasted spend, all alert notification thresholds, and filter configuration'). It clearly distinguishes from sibling list/create/delete tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly implies when to use this tool—when full details of a specific budget are needed—but does not explicitly mention alternatives or exclusions. The phrase 'specific budget' provides clear context for choosing this over azure_budget_list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

azure_budget_listAzure Budget ListA

Lists all cost budgets at a given scope with current spend, thresholds, and alert status. WAF Cost Optimization: verify every workload has budget coverage with 80% and 100% alert thresholds. CAF: every landing zone subscription should have at least one monthly budget.

ParametersJSON Schema
NameRequiredDescriptionDefault
scopeYesAzure scope: /subscriptions/{id}, /subscriptions/{id}/resourceGroups/{name}, sub:{id}, rg:{name}, mg:{managementGroupId}. CAF: set budgets at subscription level per landing zone, and at resource group level for workloads.

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden of behavioral disclosure. It specifies that the tool returns current spend, thresholds, and alert status, which implies a read-only list operation. However, it does not explicitly state safety, error behavior, pagination, or prerequisites, leaving some gaps for the agent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences: the first states purpose and return details, the second adds practical usage context (WAF/CAF). No wasted words, and key information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is a list operation with a single well-documented parameter and no output schema. The description covers the return content and gives usage scenarios, which is reasonably complete. It does not mention pagination or handling of empty results, but for a list tool of this simplicity, the provided information is largely sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides 100% coverage of the 'scope' parameter with examples and CAF guidance, so the description adds no additional parameter semantics beyond what the schema offers. Given the high schema coverage, the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool 'lists all cost budgets at a given scope' with a specific verb and resource, and includes the return fields (current spend, thresholds, alert status). This distinguishes it from siblings like azure_budget_get (single budget) and azure_budget_create/delete, making the purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context with WAF Cost Optimization and CAF scenarios, explicitly stating when this tool should be used for budget coverage verification. It does not explicitly mention alternative tools or exclusions, but the context is sufficiently clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

azure_cost_alertsAzure Cost AlertsA

Lists active cost alerts for a scope (budget breaches, credit warnings, quota violations, anomalies). WAF Cost Optimization: monitor alerts to detect unexpected cost spikes before they escalate. Complement with azure_budget_list to correlate alerts with budget thresholds.

ParametersJSON Schema
NameRequiredDescriptionDefault
scopeYesAzure scope. Formats: full path (/subscriptions/{id} | /subscriptions/{id}/resourceGroups/{name}), UUID subscription ID, sub:{id}, sub:{id}/rg:{name}, rg:{name}, mg:{managementGroupId}, ba:{billingAccountId}. CAF tip: use mg: scope for enterprise-wide analysis across landing zones.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the transparency burden. The verb 'Lists' clearly implies a read-only operation. It adds context about the types of alerts and the WAF purpose. While it doesn't mention pagination, auth, or side effects, for a list tool the description effectively conveys non-destructive behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the core function, then a relevant WAF context and sibling compliment. Every sentence earns its place, with no redundant phrasing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter list tool with no output schema, the description is remarkably complete. It covers what alerts are returned, the scope, a usage scenario, and the relationship to a sibling tool. No critical gaps for an agent to invoke correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the scope parameter is fully described in the schema. The description adds no additional parameter-level detail, sticking to the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists active cost alerts for a scope, enumerating alert types (budget breaches, credit warnings, quota violations, anomalies). It uses a specific verb+resource+scope structure and distinguishes itself from sibling azure_budget_list by focusing on alerts rather than budgets.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a clear use case: 'monitor alerts to detect unexpected cost spikes before they escalate.' It explicitly recommends complementing with azure_budget_list to correlate alerts with budget thresholds. It does not explicitly state when not to use it, but the context and sibling reference give adequate guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

azure_cost_dimensionsAzure Cost DimensionsA

Lists available dimensions for cost grouping and filtering at a given scope. Use this to discover valid values for the groupBy parameter in azure_cost_query. WAF: discover available tag keys for chargeback/showback analysis before querying.

ParametersJSON Schema
NameRequiredDescriptionDefault
scopeYesAzure scope. Formats: full path (/subscriptions/{id} | /subscriptions/{id}/resourceGroups/{name}), UUID subscription ID, sub:{id}, sub:{id}/rg:{name}, rg:{name}, mg:{managementGroupId}, ba:{billingAccountId}. CAF tip: use mg: scope for enterprise-wide analysis across landing zones.

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, but the description's verb 'Lists' clearly indicates a read-only operation. It adds practical context about discovering tag keys for WAF analysis. Since it is a simple list operation, this level of transparency is adequate, though it stops short of stating permission needs or pagination behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, both information-dense. The first states the core functionality, the second provides cross-tool usage guidance and a WAF tip. No filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has only one parameter, no output schema, and low complexity. The description adequately covers what it does, how it relates to azure_cost_query, and a practical use case. It is complete for an AI agent to select and invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with a detailed explanation of the scope parameter. The tool description does not add additional parameter semantics, which is acceptable given the schema already covers it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the tool's action ('Lists available dimensions') and resource ('cost grouping and filtering at a given scope'). It also distinguishes itself from sibling azure_cost_query by noting it provides valid values for the groupBy parameter.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on when to use the tool: 'Use this to discover valid values for the groupBy parameter in azure_cost_query.' It also includes a WAF tip for chargeback/showback analysis. However, it does not mention when not to use it or present alternative tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

azure_cost_forecastAzure Cost ForecastA

Retrieves cost forecasts based on current usage trends. WAF Cost Optimization: compare forecast vs budget to detect overspend risk proactively. Set budgets with 100% forecasted threshold to receive early warning alerts (see azure_budget_create).

ParametersJSON Schema
NameRequiredDescriptionDefault
toYesForecast end date in ISO 8601 format (e.g., 2024-03-31).
fromYesForecast start date in ISO 8601 format (e.g., 2024-02-01).
scopeYesAzure scope. Formats: full path (/subscriptions/{id} | /subscriptions/{id}/resourceGroups/{name}), UUID subscription ID, sub:{id}, sub:{id}/rg:{name}, rg:{name}, mg:{managementGroupId}, ba:{billingAccountId}. CAF tip: use mg: scope for enterprise-wide analysis across landing zones.
granularityNoDaily for short-term detail, Monthly for planning horizons.Monthly
includeActualCostNoInclude actual charges alongside forecast values for comparison.

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden for behavioral disclosure. It uses the verb 'Retrieves' implying a read-only operation, but does not disclose any other behavioral traits such as auth requirements, rate limits, data latency, or what happens with invalid scopes. It also does not describe the response format or any side effects. This is a significant gap for a tool with no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the primary purpose, and then provides a specific usage scenario with a cross-reference to azure_budget_create. Every word earns its place, with no redundant information or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has no output schema, so the description should help the agent understand what to expect. It implies the output contains forecast values and enables comparison with budgets, but it does not specify the return structure, granularity behavior, or any limitations. The schema is rich and the use case is clear, but the lack of output details and no annotations leaves the description incomplete for a fully autonomous agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The tool description itself does not add parameter information, but the schema provides detailed descriptions for all parameters, including scope formats and the CAF tip for mg: scope. The description does not need to compensate further, though it does not enhance parameter understanding either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Retrieves cost forecasts based on current usage trends' with a specific verb and resource. It also provides a use case (WAF Cost Optimization) and references azure_budget_create. However, it does not explicitly differentiate from sibling tools like azure_cost_query, relying on the tool name and context to imply distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit guidance on when to use this tool: for comparing forecast vs budget to detect overspend risk and for setting budgets with a 100% forecasted threshold to receive early warnings. It also points to azure_budget_create as a complementary tool. While it doesn't state exclusions or alternatives explicitly, the context is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

azure_cost_queryAzure Cost QueryA

Queries actual or amortized costs for an Azure scope with grouping and time filtering. WAF Cost Optimization: identify top-spending services and resource groups, track daily trends, and perform chargeback/showback using tag-based grouping. CAF: use management group scope for cross-subscription cost reports aligned to landing zones.

ParametersJSON Schema
NameRequiredDescriptionDefault
toNoISO 8601 end date for Custom timeframe (e.g., 2024-01-31).
topNoMaximum number of result rows to return.
fromNoISO 8601 start date for Custom timeframe (e.g., 2024-01-01).
typeNoCost type. ActualCost: pay-as-you-go charges as billed. AmortizedCost: includes amortized reservation and savings plan costs (recommended for showback).ActualCost
scopeYesAzure scope. Formats: full path (/subscriptions/{id} | /subscriptions/{id}/resourceGroups/{name}), UUID subscription ID, sub:{id}, sub:{id}/rg:{name}, rg:{name}, mg:{managementGroupId}, ba:{billingAccountId}. CAF tip: use mg: scope for enterprise-wide analysis across landing zones.
groupByNoDimensions to group by. Common values: ResourceGroup, ServiceName, ResourceType, Location, SubscriptionName, MeterCategory, MeterSubCategory, ChargeType. For tags prefix with 'tag:' (e.g., 'tag:CostCenter', 'tag:Environment', 'tag:Application'). WAF tagging strategy: group by tag:CostCenter and tag:Environment for chargeback/showback.
timeframeNoBilling window. Use Custom with from/to for historical queries.MonthToDate
granularityNoAggregation granularity. None=single total, Daily=trend analysis, Monthly=billing period summary.None

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the transparency burden. It uses a non-mutating verb ('Queries'), specifies cost type options, and outlines grouping/time-filtering behavior. It does not detail return format or rate limits, but for a read-only query this is reasonably transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three concise sentences: first states the core function, second/third provide WAF/CAF use cases. Every sentence adds value with no fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool without output schema or annotations, the description plus schema provide a solid understanding. It communicates the main purpose, use scenarios, and required scope information. Minor omission: it does not describe the output shape (e.g., aggregated rows) or default aggregation, but the schema's granularity/groupBy defaults partially cover this.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, including detailed parameter descriptions for scope formats, groupBy tag syntax, and enum meanings. The prose description adds only high-level mentions of grouping and time filtering, not additional parameter-level semantics, so baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence uses the specific verb 'Queries' and identifies the resource ('actual or amortized costs for an Azure scope') with key capabilities ('grouping and time filtering'), clearly distinguishing it from sibling tools like azure_cost_forecast or azure_cost_dimensions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides concrete usage scenarios: WAF Cost Optimization for identifying top spenders, tracking daily trends, and chargeback/showback via tags; and CAF usage with management group scope for cross-subscription reporting. It does not explicitly name alternative tools, but the use cases imply when cost query is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 9 tool updatesv1.0.0
    • First observedazure_advisor_recommendations
    • First observedazure_budget_create
    • First observedazure_budget_delete
    • First observedazure_budget_get
    • First observedazure_budget_list
    • First observedazure_cost_alerts
    • First observedazure_cost_dimensions
    • First observedazure_cost_forecast
    • First observedazure_cost_query

TDQS

A4.1/5.0

Scored across 9 tools

Disambiguation5/5

Each tool targets a distinct aspect of cost management: querying, forecasting, dimensions, alerts, budget CRUD, and Advisor recommendations. The descriptions clarify boundaries between similar tools like alerts vs. budget list, preventing confusion.

Naming Consistency4/5

Names follow a consistent prefix pattern (azure_cost_, azure_budget_, azure_advisor_) with mostly verb-based actions (query, forecast, list, get, create, delete). However, 'azure_cost_dimensions' and 'azure_cost_alerts' use noun forms, which is a minor deviation from the verb_noun convention.

Tool Count5/5

Nine tools is well-scoped for an Azure cost management server. Each tool serves a clear purpose without redundancy, covering the essential operations for cost analysis and budget management.

Completeness4/5

The tool surface covers the core cost management lifecycle: querying, forecasting, alerts, budget CRUD, and recommendations. Minor gaps exist, such as lacking cost export functionality or direct alert configuration, but these are not critical for most workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables natural language analysis of Azure usage data from CSV files, providing cost summaries, visualizations, and insights about service and regional spending patterns.
    1
    -
  • A
    license
    A
    quality
    D
    maintenance
    Provides AI assistants with real-time access to Azure retail pricing information, enabling price searches, regional cost comparisons, monthly bill estimates, and SKU discovery through natural language queries.
    13
    55
    MIT