Version 4.43 or later needs to be installed to add the server automatically
Tools
| Name | Description |
|---|---|
cost-explorer | Retrieves AWS cost and usage data using the Cost Explorer API. IMPORTANT USAGE GUIDELINES: - Use UnblendedCost metric by default (not BlendedCost) unless user specifies otherwise - Exclude record_types 'Credit' and 'Refund' by default unless user requests inclusion - Choose DAILY granularity for periods <3 months, MONTHLY for longer periods - Start with high-level dimensions (SERVICE, LINKED_ACCOUNT) before detailed ones - Always remember that the end_date is exclusive USE THIS TOOL FOR: - **Historical cost trends** and spending analysis (any time period) - **Usage pattern analysis** over time - **Cost breakdown** by service, account, region, or any dimension - **Forecasting** future costs and usage - **Resource-level cost analysis** (last 14 days) - **Multi-dimensional cost analysis** with complex grouping ## OPERATIONS 1) getCostAndUsage — account-level historical cost/usage Required: operation="getCostAndUsage", start_date, end_date, granularity, metrics Optional: group_by, filter, next_token, max_pages, billing_view_arn Example: {"operation": "getCostAndUsage", "start_date": "2024-01-01", "end_date": "2024-02-01", "granularity": "DAILY", "metrics": ["UnblendedCost"], "group_by": "[{"Type": "DIMENSION", "Key": "SERVICE"}]"} 2. getCostAndUsageWithResources - Resource-level cost data (limited to last 14 days) Required: operation="getCostAndUsageWithResources", filter, granularity, start_date, end_date Optional: metrics, group_by, next_token, max_pages, billing_view_arn Notes: RESOURCE_ID must be included in either filter OR group_by parameters. This operation is limited to past 14 days of data from current date. Hourly granularity is only available for EC2-Instances resource-level data. All other resource-level data is available at daily granularity. Example: {"operation": "getCostAndUsageWithResources", "start_date": "2025-08-07", "end_date": "2025-08-21", "granularity": "DAILY", "filter": "{"Dimensions": {"Key": "SERVICE", "Values": ["Amazon Elastic Compute Cloud - Compute"]}}", "group_by": "[{"Type": "DIMENSION", "Key": "RESOURCE_ID"}]"} Returns: Cost data with resource-level granularity 3. getDimensionValues - List of available values for specified dimension Required: operation="getDimensionValues", dimension, start_date, end_date Optional: context, search_string, filter, max_results, billing_view_arn Example: {"operation": "getDimensionValues", "dimension": "SERVICE", "start_date": "2024-01-01", "end_date": "2024-02-01"} Returns: List of values for specified dimension with automatic pagination 4. getCostForecast - Future cost projections Required: operation="getCostForecast", metric, granularity, start_date, end_date Optional: filter, prediction_interval_level, billing_view_arn Example: {"operation": "getCostForecast", "metric": "UNBLENDED_COST", "granularity": "MONTHLY", "start_date": "2025-08-22", "end_date": "2025-11-22"} Notes: metric value for this operation should be in all caps Returns: Cost forecast for specified time period and granularity 5. getUsageForecast - Future usage projections Required: operation="getUsageForecast", metric, granularity, start_date, end_date, filter Optional: prediction_interval_level, billing_view_arn Example 1: {"operation": "getUsageForecast", "metric": "USAGE_QUANTITY", "granularity": "MONTHLY", "start_date": "2025-08-22", "end_date": "2025-11-22", "filter": "{"Dimensions": {"Key": "USAGE_TYPE_GROUP", "Values": ["EC2-Instance"]}}"} Example 2: {"operation": "getUsageForecast", "metric": "USAGE_QUANTITY", "granularity": "MONTHLY", "start_date": "2025-08-22", "end_date": "2025-11-22", "filter": "{"And": [{"Dimensions": {"Key": "SERVICE", "Values": ["Amazon Elastic Compute Cloud - Compute"]}}, {"Dimensions": {"Key": "USAGE_TYPE", "Values": ["BoxUsage:p4de.24xlarge"]}}]}"} Example 3: {"operation": "getUsageForecast", "metric": "USAGE_QUANTITY", "granularity": "MONTHLY", "start_date": "2025-08-22", "end_date": "2025-11-22", "filter": "{"Dimensions": {"Key": "USAGE_TYPE", "Values": ["BoxUsage:p4de.24xlarge", "Reservation:p4de.24xlarge", "UnusedBox:p4de.24xlarge"]}}", "group_by": "[{"Type": "DIMENSION", "Key": "REGION"}]"} Notes: Valid values for metric is: USAGE_QUANTITY, NORMALIZED_USAGE_AMOUNT. Valid values for granularity is: DAILY, MONTHLY. Filter is REQUIRED and must specify USAGE_TYPE or USAGE_TYPE_GROUP to define what usage units to forecast. Returns: Usage forecast for specified time period and granularity 6. getTagsOrValues - Available cost allocation tags or values Required: operation="getTagsOrValues" Optional: start_date, end_date, search_string, next_token, max_pages, billing_view_arn Example 1: {"operation": "getTagsOrValues"} Example 2: {"operation": "getTagsOrValues", "tag_key": "Environment"} Returns: List of available cost allocation tags with automatic pagination. If tag values for a particular key are needed, pass the tag key as a parameter. 7. getCostCategories - Available cost categories or values inside a category Required: operation="getCostCategories", start_date, end_date Optional: cost_category_name, search_string, next_token, max_pages, billing_view_arn Example 1 (list category names): {"operation": "getCostCategories", "start_date": "2024-01-01", "end_date": "2024-08-01"} Example 2 (list values inside a category): {"operation": "getCostCategories", "cost_category_name": "CostCenters", "start_date": "2024-01-01", "end_date": "2024-08-01"} Notes: Without cost_category_name the response contains CostCategoryNames. With cost_category_name set the response contains CostCategoryValues for that category. Pagination is automatic. 8. getSavingsPlansUtilization - Savings Plans utilization data Required: operation="getSavingsPlansUtilization", start_date, end_date Optional: granularity, filter Example: {"operation": "getSavingsPlansUtilization", "granularity": "MONTHLY"} Notes: This operation supports only DAILY and MONTHLY granularity Returns: Savings Plans utilization for the specified time period DIMENSION REFERENCE: - AZ: The Availability Zone (e.g., us-east-1a) - DATABASE_ENGINE: The Amazon RDS database (e.g., Aurora, MySQL) - DEPLOYMENT_OPTION: RDS deployment scope (SingleAZ, MultiAZ) - INSTANCE_TYPE: The EC2 instance type (e.g., m4.xlarge) - INSTANCE_TYPE_FAMILY: Family of instances (e.g., Compute Optimized, Memory Optimized) - LINKED_ACCOUNT: AWS member accounts - OPERATING_SYSTEM: OS type (e.g., Windows, Linux) - PLATFORM: EC2 operating system - PURCHASE_TYPE: Reservation type (e.g., On-Demand, Reserved) - REGION: AWS Region - SERVICE: AWS service (e.g., Amazon DynamoDB) - TAG: Cost allocation tag - TENANCY: EC2 tenancy (shared, dedicated) - USAGE_TYPE: Usage type (e.g., DataTransfer-In-Bytes) - RECORD_TYPE: Charge types (e.g., RI fees, usage costs) BILLING VIEW SUPPORT: Most Cost Explorer operations support an optional billing_view_arn parameter that allows you to scope your query to a specific billing view. If not provided, the query defaults to the account's primary billing view. You can use the list-billing-views and get-billing-view tools upon request to discover available billing views and their ARNs. Billing view types: - PRIMARY: Default view with all cost data for the account/org. Use for standard cost analysis. - BILLING_GROUP: AWS managed view for Billing Conductor billing groups with pro forma cost data. - CUSTOM: Customer-created views with filtered cost data that can be shared across accounts and organizations. Use for business-unit, team, or cross-org cost visibility without management account access. - BILLING_TRANSFER: Available to Bill Transfer (bill receiver) account, who is responsible for paying the consolidated bill on behalf of the other organization. AWS managed view containing chargeable data, which is what the Bill Transfer (bill receiver) account owes to AWS for their Bill Source accounts' cloud consumption. - BILLING_TRANSFER_SHOWBACK: Available to Bill Transfer (bill receiver) account. AWS managed view showing pro forma showback/chargeback data (what Bill Source account owe their partner). Use for showback/chargeback reporting in billing transfer scenarios. |