Repository navigation
Commit eae52c9
authored
fix(billing-cost-management-mcp-server): list the exact cost-explorer RECORD_TYPE values (#4874)
* fix(billing-cost-management-mcp-server): list the exact cost-explorer RECORD_TYPE values
The cost-explorer DIMENSION REFERENCE described RECORD_TYPE as
"Charge types (e.g., RI fees, usage costs)". Cost Explorer matches
RECORD_TYPE values exactly and case-sensitively, so a filter on a guessed
value such as "RI fees" returns no rows and reads as $0.
The entry now lists the values Cost Explorer returns and matches: Usage,
DiscountedUsage, SavingsPlanCoveredUsage, SavingsPlanNegation,
SavingsPlanRecurringFee, SavingsPlanUpfrontFee, Recurring, Upfront,
Support, Other, Tax, Credit, Refund, and the seven discount types by full
name (for example Bundled Discount). It says that the CUR and Cost
Categories line-item types RIFee and Fee match nothing in a Cost Explorer
filter and names Recurring, Upfront and Other to use instead. It points
to getDimensionValues for the account's own list.
Adds a description contract test for the entry.
* fix(billing-cost-management-mcp-server): use real Cost Explorer values in dimension examples
Five cost-explorer DIMENSION REFERENCE entries and the cost-comparison
PLATFORM entry gave example values that Cost Explorer does not return:
Aurora, SingleAZ/MultiAZ, Compute Optimized/Memory Optimized, Linux and
On-Demand. Dimension filters are exact, so a model that filters on one of
them gets no rows and reads the result as $0.
The examples are now values Cost Explorer returns: Aurora MySQL, Aurora
PostgreSQL, MySQL and PostgreSQL for DATABASE_ENGINE; Single-AZ and
Multi-AZ for DEPLOYMENT_OPTION; m5, t3 and c6g for INSTANCE_TYPE_FAMILY,
noting that the case varies by service (r5 and R5 are separate values);
Linux/UNIX and Windows (Amazon VPC) for OPERATING_SYSTEM and PLATFORM
(cost-explorer PLATFORM had no examples); On Demand Instances, Standard
Reserved Instances and Savings Plans for PURCHASE_TYPE. DATABASE_ENGINE
and DEPLOYMENT_OPTION no longer say RDS only, since other services
report them too.
Adds a parametrized description contract test for the seven entries.
* fix(billing-cost-management-mcp-server): correct the RECORD_TYPE note on the CUR Fee type
The RECORD_TYPE entry said that the CUR line-item types RIFee and Fee
match nothing in a Cost Explorer filter. That holds for RIFee, which Cost
Explorer always reports as Recurring. It does not hold for every Fee row:
Cost Explorer reports most of them as Upfront, Other or Support, but a
fee that is none of those keeps the Fee type. A Fee filter therefore
misses most fees rather than matching nothing.
The note now says that, and the test and CHANGELOG follow it.
* chore(billing-cost-management-mcp-server): drop the CHANGELOG entries for the dimension fixes
These are non-breaking description fixes. Leaving CHANGELOG.md untouched
avoids rebase conflicts with other changes that edit the Unreleased
section.
* fix(billing-cost-management-mcp-server): say unmapped CUR types pass through in RECORD_TYPE
The RECORD_TYPE entry called its list "Exact" values, which reads as a
complete list, and said only that Fee "can remain". When building the
record type, Cost Explorer maps discounts, support charges, subscription
fees and RIFee, keeps a fixed set of types unchanged, and passes any other
CUR line-item type through as-is, for example a Fee with no subscription
that is not a support charge.
The entry now says the values are case-sensitive without calling the list
exact, and states the pass-through. The test pins both.1 parent b9b0c94 commit eae52c9
3 files changed
Lines changed: 143 additions & 8 deletions
File tree
- src/billing-cost-management-mcp-server
- awslabs/billing_cost_management_mcp_server/tools
- tests/tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
222 | | - | |
223 | | - | |
| 222 | + | |
| 223 | + | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
| 226 | + | |
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
230 | | - | |
| 231 | + | |
231 | 232 | | |
232 | | - | |
233 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| |||
239 | 241 | | |
240 | 242 | | |
241 | 243 | | |
242 | | - | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
243 | 256 | | |
244 | 257 | | |
245 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1635 | 1635 | | |
1636 | 1636 | | |
1637 | 1637 | | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
| 1655 | + | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
| 1662 | + | |
| 1663 | + | |
| 1664 | + | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
| 1672 | + | |
| 1673 | + | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
| 1679 | + | |
| 1680 | + | |
| 1681 | + | |
| 1682 | + | |
| 1683 | + | |
| 1684 | + | |
| 1685 | + | |
| 1686 | + | |
| 1687 | + | |
| 1688 | + | |
| 1689 | + | |
| 1690 | + | |
| 1691 | + | |
| 1692 | + | |
| 1693 | + | |
| 1694 | + | |
| 1695 | + | |
| 1696 | + | |
| 1697 | + | |
| 1698 | + | |
| 1699 | + | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
| 1740 | + | |
| 1741 | + | |
| 1742 | + | |
| 1743 | + | |
| 1744 | + | |
| 1745 | + | |
| 1746 | + | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
1638 | 1760 | | |
1639 | 1761 | | |
1640 | 1762 | | |
| |||
0 commit comments