Skip to main content
Glama
bigonil

Azure Cost Management MCP

by bigonil

Azure Cost Query

azure_cost_query

Query Azure actual or amortized costs for any scope, with grouping by service, tags, or resource group, and time-based filtering to support cost optimization and chargeback.

Instructions

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.

Input Schema

TableJSON 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
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.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bigonil/azure-cost-management-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server