billing-cost-management-mcp-server: get_reservation_coverage fails with ValidationException when group_by is specified
Describe the bug
The ri_performance tool's get_reservation_coverage operation fails with a ValidationException when group_by is provided. The AWS GetReservationCoverage API requires that Granularity and GroupBy are mutually exclusive, but the MCP server sends both — it defaults to DAILY granularity and does not omit it when group_by is specified.
The tool's own description states:
IMPORTANT: GroupBy and Granularity are mutually exclusive for coverage. When group_by is provided, granularity is automatically omitted from the coverage request.
This behavior is not implemented.
Expected Behavior
Granularity is omitted from the API call. Results grouped by INSTANCE_TYPE are returned, including attributes.instanceType, attributes.databaseEngine, attributes.deploymentOption, attributes.region, and coverage hours.
Current Behavior
ValidationException: Granularity is not supported when specifying groupByFull error response:
{
"Error": {
"Message": "Granularity is not supported when specifying groupBy",
"Code": "ValidationException"
}
}Reproduction Steps
Call ri_performance with:
{
"operation": "get_reservation_coverage",
"start_date": "2026-03-01",
"end_date": "2026-04-01",
"filter": "{\"Dimensions\": {\"Key\": \"SERVICE\", \"Values\": [\"Amazon Relational Database Service\"]}}",
"group_by": "[{\"Type\": \"DIMENSION\", \"Key\": \"INSTANCE_TYPE\"}]"
}Tested 4 times with different group_by combinations — same error every time:
group_by: [{"Type": "DIMENSION", "Key": "INSTANCE_TYPE"}]— failsgroup_by: [{"Type": "DIMENSION", "Key": "INSTANCE_TYPE"}, {"Type": "DIMENSION", "Key": "REGION"}, {"Type": "DIMENSION", "Key": "DATABASE_ENGINE"}, {"Type": "DIMENSION", "Key": "DEPLOYMENT_OPTION"}]— fails- Without
group_by+ withgranularity: "MONTHLY"— succeeds (returns aggregate only) - With
granularity: "NONE"+group_by— fails (NONE is not a valid granularity value)
Possible Solution
No response
Additional Information/Context
No response
OS
macOS
Server
billing-cost-management-mcp-server
Server Version
No response
Region experiencing the issue
us-east-1
Other information
No response
Service quota
- I have reviewed the service quotas for this construct
Source: awslabs/mcp