Skip to content

feat(billing-cost-management): add Compute Optimizer get_idle_recomme… - #4551

Merged
somsubhro merged 2 commits into
awslabs:mainfrom
pputra:feat/compute-optimizer-idle-recommendations
Aug 31, 2026
Merged

feat(billing-cost-management): add Compute Optimizer get_idle_recomme…#4551
somsubhro merged 2 commits into
awslabs:mainfrom
pputra:feat/compute-optimizer-idle-recommendations

Conversation

@pputra

@pputra pputra commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

…ndations and surface COH current resource details

Fixes

Summary

Changes

Two additive changes to the billing-cost-management-mcp-server, both around AWS Compute
Optimizer / Cost Optimization Hub:

  1. compute-optimizer tool — new get_idle_recommendations operation. Wraps the Compute
    Optimizer GetIdleRecommendations
    API with server-side filtering by Finding (Idle / Unattached / Unused) and
    ResourceType. It reuses the same enrollment (ACTIVE) check and error handling as the
    existing recommendation operations. The formatted response includes resource ARN/ID/type,
    account ID, finding + finding description, both savings-opportunity variants (with and without
    discounts), utilization metrics, lookback period, last-refresh timestamp, tags, response-level
    errors, and the pagination token.

  2. cost-optimization-hub get_recommendation — surface current_resource_details.
    Previously the formatted response included only recommended_resource_details; it now also
    includes current_resource_details.

Added unit tests for both changes (idle: basic call, filters/pagination, operation dispatch;
COH: current + recommended resource details) and a CHANGELOG entry. ruff check/ruff format
are clean.

User experience

Before

  • The compute-optimizer tool exposed only performance/right-sizing operations — there was no way
    to retrieve Compute Optimizer idle recommendations or to filter by resource state
    (idle / unattached / unused).
  • cost-optimization-hub get_recommendation returned only the recommended resource details.

After

  • Users can call compute-optimizer with operation="get_idle_recommendations" and filter by
    Finding and ResourceType to get idle-resource recommendations directly
  • cost-optimization-hub get_recommendation returns current_resource_details alongside
    recommended_resource_details, so current resource state is available.

Checklist

If your change doesn't seem to apply, please leave them unchecked.

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Is this a breaking change? (Y/N) N

RFC issue number:

Checklist:

  • Migration process documented
  • Implement warnings (if it can live side by side)

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 93.22%. Comparing base (5609db9) to head (9fb7d65).

Files with missing lines Patch % Lines
...gement_mcp_server/tools/compute_optimizer_tools.py 95.65% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4551   +/-   ##
=======================================
  Coverage   93.22%   93.22%           
=======================================
  Files        1046     1046           
  Lines       88477    88502   +25     
  Branches    14293    14301    +8     
=======================================
+ Hits        82482    82510   +28     
+ Misses       3623     3622    -1     
+ Partials     2372     2370    -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

wangyuhere
wangyuhere previously approved these changes Aug 28, 2026
somsubhro
somsubhro previously approved these changes Aug 28, 2026
…ndations and surface COH current resource details

Signed-off-by: pputra <mynameisyoga@live.com>
@pputra
pputra dismissed stale reviews from somsubhro and wangyuhere via 70e6bc9 August 28, 2026 20:34
@pputra
pputra force-pushed the feat/compute-optimizer-idle-recommendations branch from c7d9ed6 to 70e6bc9 Compare August 28, 2026 20:34
@somsubhro
somsubhro added this pull request to the merge queue Aug 31, 2026
Merged via the queue into awslabs:main with commit 9045e9d Aug 31, 2026
137 checks passed
@github-project-automation github-project-automation Bot moved this from To triage to Done in awslabs/mcp Project Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants