Repository navigation
Commit 69e2666
authored
fix(billing-cost-management-mcp-server)!: request COH savings percentage, coerce boolean filters, fold summaries group_by (#4906)
* fix(billing-cost-management-mcp-server)!: request COH savings percentage, coerce boolean filters, fold summaries group_by
- list_recommendation_summaries now sends metrics=['SavingsPercentage'].
Without it the service returns the placeholder "Percentage not
requested." in metrics.savingsPercentage, which the tool passed through
as a metric. A percentage value ('12%', '>=80%', '<=2%') is returned as
metrics.savings_percentage; any other text the service puts in that
field (before-discounts mode, unsupported filter, not calculable) is
returned as metrics.savings_percentage_unavailable_reason. A metrics
block without a string value gives no metrics key.
- restartNeeded / rollbackPossible filters given as "true"/"false"
strings are coerced to booleans instead of failing botocore parameter
validation.
- Summaries group_by fixed dimensions match case- and
underscore-insensitively (resource_type -> ResourceType), like filter
keys. The missing-group_by error lists the same values as the
invalid-group_by error, including TagKey:<tag key>. The unreachable
'RESOURCE_TYPE' fallback is removed.
- The description documents the savings percentage and its limits, the
resourceIds / resourceArns / recommendationIds filters (list only;
summaries reject them), that there is no
per-service resource type filter, and that summary fields are the same
on every page, including continuation calls (it said they were not
repeated).
No tool parameter is added, renamed, retyped or given a new default.
BREAKING CHANGE: cost-optimization list_recommendation_summaries no
longer returns the service's explanation text in
metrics.savings_percentage. When no percentage is computed,
metrics.savings_percentage is absent and the text is in
metrics.savings_percentage_unavailable_reason. Before this change the
field always held the "Percentage not requested." placeholder.
* docs(billing-cost-management-mcp-server): note COH savings percentage excludes credits and refunds
The service computes metrics.savingsPercentage against the last 30 days'
net amortized cost with the Credit and Refund record types filtered out.
Say so in the cost-optimization description and the CHANGELOG entry, so a
caller comparing it to Cost Explorer's net amortized cost with no
record-type filter knows why the figures differ.
Also say that total_recommendation_count is not one of the summary fields
repeated on every page, and drop the CHANGELOG clause about documenting
the ID filters, which main already covers.
* fix(billing-cost-management-mcp-server): match COH summaries group_by case-insensitively only
Fold only letter case in list_recommendation_summaries group_by, not
underscores, so the legacy upper-snake spelling RESOURCE_TYPE (and
resource_type) is rejected locally as an invalid dimension instead of
being sent as ResourceType. resourcetype and ACCOUNTID still resolve.
The description, the CHANGELOG entry and the tests say the same.1 parent d5872b3 commit 69e2666
0 file changed
0 commit comments