FinOps Tools
CoreStack FinOps MCP tools give AI agents structured, authenticated access to cloud cost management data. The tools cover eight functional areas: cloud account discovery, billing trends, anomaly detection, budgets, cost optimization recommendations, Reserved Instance management, savings summaries, and dimension discovery.
All tools require a valid CoreStack session (injected via Context) and return a standard envelope:
{
"summary" | "Summary": { "total_records": int, ... },
"output" | "Output": list | dict
}Accounts
get_service_account_ids
get_service_account_idsRetrieve cloud service accounts (cloud accounts) with their IDs and display names for one or more tenants. Returns the flat ids list used as input to all cost and usage tools. Include native_details in include_fields to determine the cloud provider (AWS, Azure, GCP, OCI) from native_details.type.
| Parameter | Type | Description | Required |
|---|---|---|---|
| tenant_ids | list[str] | Tenant IDs to query | Mandatory |
| batch_size | int | Records per page (default: 2000) | Optional |
| batch_offset | int | Pagination offset (default: 0) | Optional |
| sort_column | str | Column to sort by (default: "Name") | Optional |
| sort_ascending | bool | Sort direction — True = ascending (default: True) | Optional |
| include_fields | list[str] | Extra fields to return. Valid values: name, is_active_in_cloud, native_details, status, currency, custom_tags, onboarding_type | Optional |
Returns: Object containing service_accounts (list of account objects), ids (flat list of account ID strings), total, batch_size, and batch_offset.
Sample Questions
- "List all cloud accounts for tenant
abc123." - "Which cloud provider does account
xyz789belong to?" - "Show me all active AWS and Azure accounts across my tenants."
- "How many cloud accounts do I have in total?"
Anomalies
get_anomalies
get_anomaliesDetect and summarize billing cost anomalies within a date range. Aggregates results by anomaly type, product category, resource category, and impacted accounts. Defaults to the current calendar month when no dates are supplied.
| Parameter | Type | Description | Required |
|---|---|---|---|
| start_date | str | Start date (YYYY-MM-DD). Defaults to first day of current month | Optional |
| end_date | str | End date (YYYY-MM-DD). Defaults to today | Optional |
| currency | str | Currency code (default: "USD") | Optional |
| anomaly_status | str | Filter by status: "active" or "rejected" | Optional |
| service_account_ids | list[str] | Cloud account IDs to scope the query | Optional |
| provider | str | Cloud provider filter: "AWS", "Azure", or "GCP" | Optional |
Returns: Object with period, total anomaly count, total cost impact, breakdowns by type / product category / resource category, top impacted accounts, top individual anomalies, and a daily trend series.
Sample Questions
- "Are there any active cost anomalies this month?"
- "What is the total cost impact of anomalies in the last 30 days?"
- "Which AWS accounts have the most anomalies?"
- "Show me anomalies in the Compute category for Azure this quarter."
- "How has the daily anomaly trend looked over the past two weeks?"
get_anomaly_resources
get_anomaly_resourcesDrill down to resource-level anomaly details. Returns the top resources by cost impact and a breakdown by product category. Use after get_anomalies to investigate specific services or categories.
| Parameter | Type | Description | Required |
|---|---|---|---|
| start_date | str | Start date (YYYY-MM-DD). Defaults to first day of current month | Optional |
| end_date | str | End date (YYYY-MM-DD). Defaults to today | Optional |
| service_account_ids | list[str] | Cloud account IDs to scope the query | Optional |
| provider | str | Cloud provider filter: "AWS", "Azure", or "GCP" | Optional |
| product_category | str | Filter to a specific product/service category | Optional |
| top_n | int | Number of top resources to return (default: 10) | Optional |
Returns: Object with period, total count of resources with anomalies, top resource list (sorted by cost impact), and a by-product-category breakdown.
Sample Questions
- "Which specific resources are causing the most cost anomalies this month?"
- "Show me the top 5 anomalous resources in the Storage category on GCP."
- "Which EC2 instances have anomalous spend in account
abc123?"
Billing
get_cost_aggregation_trend
get_cost_aggregation_trendLow-level, fully parameterized billing query tool. Supports arbitrary dimension grouping, filter trees, and multiple granularities. Default behavior (no group_by) returns a cloud-account-wise cost breakdown. Use this tool when other higher-level tools do not meet the query requirements.
| Parameter | Type | Description | Required |
|---|---|---|---|
| service_account_ids | list[str] | Cloud service account IDs | Mandatory |
| start_date | str | ISO-8601 UTC timestamp (e.g. "2025-10-01T00:00:00.000Z") | Mandatory |
| end_date | str | ISO-8601 UTC timestamp | Mandatory |
| filters | dict | Nested QueryOperator filter tree | Optional |
| time_zone | str | IANA time zone string (e.g. "America/New_York") | Optional |
| platform | str | Platform filter | Optional |
| skip_service_account_grouping | bool | Skip automatic grouping by service account (default: False) | Optional |
| billing_source | str | "raw_cost" (default) | Optional |
| group_by | list[dict] | Dimensions to group by. 28+ valid selectors including product_category, resource_category, location, service_name, tags, dimension, and more | Optional |
| limit | int | Maximum results; 0 = no limit (default: 0) | Optional |
| billing_mode | bool | Enable billing mode (default: False) | Optional |
| include_resource_children | bool | Include child resources (default: False) | Optional |
| granularity | int | Aggregation window in seconds. 2592000 = monthly (default), 86400 = daily | Optional |
| compute_forecast | bool | Include cost forecast (default: False) | Optional |
Returns: Object with total_records summary and raw output list of trend data points.
Sample Questions
- "What is my total AWS spend per month for the last 6 months?"
- "Break down costs by service name for account
abc123in October 2025." - "Show me daily cost trend for GCP over the past 30 days grouped by region."
- "What is the forecasted spend for my Azure accounts this month?"
- "Filter costs to only show Compute resources grouped by resource category."
get_billing_usage_trend
get_billing_usage_trendRetrieve resource consumption trends over time (GB transferred, vCPU-hours, API calls, etc.). Returns time-series usage quantities — not dollar costs. Use alongside get_billing_rate_trend to understand unit economics.
| Parameter | Type | Description | Required |
|---|---|---|---|
| service_account_ids | list[str] | Cloud service account IDs | Mandatory |
| start_date | str | ISO-8601 UTC timestamp | Mandatory |
| end_date | str | ISO-8601 UTC timestamp | Mandatory |
| group_by | list[dict] | Dimension grouping (e.g. service_name, location, resource_type) | Optional |
| filters | dict | Nested QueryOperator filter tree | Optional |
| granularity | int | Aggregation window in seconds. 2592000 = monthly (default), 86400 = daily | Optional |
| time_zone | str | IANA time zone string | Optional |
| limit | int | Maximum results; 0 = no limit (default: 0) | Optional |
Returns: Object with total_records summary and output list of usage trend data points.
Sample Questions
- "How much storage (GB) did we consume on S3 last month?"
- "Show me daily API call volume for Azure Functions over the past two weeks."
- "Which region consumed the most compute hours in Q3?"
- "Compare monthly data transfer usage across all GCP accounts."
get_billing_rate_trend
get_billing_rate_trendRetrieve unit-price trends over time ($/GB, $/hour, $/API call, etc.). Rates are undefined (returned as null) when usage is zero for a period. Use to detect pricing changes or negotiate better rates.
| Parameter | Type | Description | Required |
|---|---|---|---|
| service_account_ids | list[str] | Cloud service account IDs | Mandatory |
| start_date | str | ISO-8601 UTC timestamp | Mandatory |
| end_date | str | ISO-8601 UTC timestamp | Mandatory |
| group_by | list[dict] | Dimension grouping | Optional |
| filters | dict | Nested QueryOperator filter tree | Optional |
| granularity | int | Aggregation window in seconds. 2592000 = monthly (default), 86400 = daily | Optional |
| time_zone | str | IANA time zone string | Optional |
| limit | int | Maximum results; 0 = no limit (default: 0) | Optional |
Returns: Object with total_records, undefined_rate_count summary, and output list of rate trend data points.
Sample Questions
- "How has the per-GB S3 storage rate changed over the past year?"
- "Show the hourly EC2 rate trend for account
abc123in us-east-1." - "Has our Azure compute unit price gone up or down over the last 6 months?"
- "Compare storage rates across AWS and GCP accounts this quarter."
Budget
get_budgets
get_budgetsList all budgets with an aggregated health summary. Calculates spend-vs-budget percentages, identifies over-budget and forecast-exceeded items, and provides breakdowns by scope, frequency, and status.
| Parameter | Type | Description | Required |
|---|---|---|---|
| view | str | "list" = full budget data (default); "summary" = counts only | Optional |
| status | list[str] | Filter by status (e.g. ["in_progress", "draft"]) | Optional |
| provider | list[str] | Filter by cloud provider (e.g. ["AWS", "Azure"]) | Optional |
| budget_scope | str | "tenant", "cloud", or "custom" | Optional |
| frequency | str | Filter by frequency (e.g. "Monthly", "Quarterly") | Optional |
Returns: Object containing a summary (total budget amount, total actual spend, exceeded count, forecast exceeded count, health percentage, breakdowns by scope/frequency/status, top-10 exceeded budgets) and an output.budgets_list (populated when view="list").
Sample Questions
- "How many budgets are currently over their limit?"
- "What is the overall budget health percentage across all cloud accounts?"
- "Show me all monthly AWS budgets that are in progress."
- "Which budgets are forecast to be exceeded this quarter?"
- "Give me a summary count of budgets by status."
get_budget_detail
get_budget_detailRetrieve detailed configuration and spend metrics for a single budget. Fetches thresholds, alert configurations, and optional period-by-period spend history. Uses a fail-open design — partial data is returned if auxiliary calls (alerts, history) fail.
| Parameter | Type | Description | Required |
|---|---|---|---|
| budget_id | str | Unique budget identifier | Mandatory |
| include_history | bool | Include period-by-period spend history (default: False) | Optional |
Returns: Object with budget name, ID, frequency, status, currency, scope (type, clouds, accounts), amount details (total, type, growth percentage, planned limits), thresholds, alerts, period (start, end, is_recurring), and optionally spend history.
Sample Questions
- "Show me the full details of budget
budget_abc123." - "What are the alert thresholds configured for this budget?"
- "Has budget
xyzbeen exceeded in previous months? Show the history." - "What cloud accounts are in scope for budget
budget_001?"
Cost Recommendation
get_cost_optimization_by_types
get_cost_optimization_by_typesFetch cost optimization recommendations grouped by optimization type (e.g. idle, orphaned, right-size). Returns estimated monthly savings per resource across all cloud accounts.
| Parameter | Type | Description | Required |
|---|---|---|---|
| currency | str | Currency code (default: "USD") | Optional |
| deduplication | bool | Deduplicate overlapping recommendations (default: False) | Optional |
| filter | dict | Filter dict per API specification | Optional |
Returns: data list where each item contains cost_savings, optimization_type, cloud_account, cloud_provider, region, resource_name, resource_type, resource_id, resource_category, and optimization_name.
Sample Questions
- "What are my top cost optimization opportunities across all cloud accounts?"
- "How much could I save by eliminating idle resources on AWS?"
- "Show me all orphaned Storage resources with potential savings."
- "What is the total potential monthly saving from right-sizing recommendations?"
get_right_sizing_recommendations
get_right_sizing_recommendationsFetch detailed right-sizing recommendations for a specific cloud account. Returns per-resource current and recommended SKU with estimated savings. Use get_service_account_ids to obtain cloud_account_id.
| Parameter | Type | Description | Required |
|---|---|---|---|
| cloud_account_id | str | 24-character hex MongoDB ObjectId of the cloud account | Mandatory |
| currency | str | Currency code (default: "USD") | Optional |
| page | int | Page number for pagination (default: 0) | Optional |
| limit | int | Records per page (default: 100) | Optional |
| search | str | Search by resource name or resource ID | Optional |
| filters | dict | Filter by impact_level, optimization_type, resource_type, savings range, etc. | Optional |
Returns: Object with total_count and recommendation_data list. Each item contains resource_id, resource_name, current_sku, recommended_sku, optimization_type, potential_est_cost_saving, region, cloud_provider, and resource_type.
Sample Questions
- "Which EC2 instances in account
abc123should be right-sized?" - "Show me the top 10 most impactful right-sizing recommendations for my AWS account."
- "What SKU is recommended for instance
i-0abc123?" - "How much can I save by right-sizing all high-impact resources?"
get_recommendation_resources
get_recommendation_resourcesRetrieve resource-level details for a specific optimization recommendation type (idle, orphaned, right-size, or config). Use as a drill-down after get_cost_optimization_by_types.
| Parameter | Type | Description | Required |
|---|---|---|---|
| request_type | str | Optimization type: "idle" (default), "orphaned", "right_size", or "config" | Optional |
| cloud_account_id | str | Cloud account ID (from get_service_account_ids) | Mandatory |
| provider | str | Cloud provider label: "AWS" (default), "Azure", "GCP" | Optional |
| currency | str | Currency code (default: "USD") | Optional |
| resource_status | str | Filter by status: "open" (default), "closed", or "rejected" | Optional |
| page | int | Page number for pagination (default: 1) | Optional |
| limit | int | Records per page (default: 50) | Optional |
Returns: Object with request_type, cloud_account_id, total_resources, total_pages, page_savings, resources_on_page, and resources list (sorted by estimated saving descending). Each resource includes resource_id, resource_name, resource_type, current_sku, recommended_sku, estimated_cost_saving, region, impact_level, optimization_type, status, and summary.
Sample Questions
- "List all idle resources in my AWS account
abc123." - "Which orphaned disks can I delete to save money on Azure?"
- "Show me open right-sizing opportunities sorted by highest savings."
- "How many resources have been closed or rejected in account
xyz?"
Discovery
get_dimensions
get_dimensionsRetrieve cost dimensions available for grouping and filtering FinOps queries. Use the returned dimension IDs and names as valid inputs to group_by and filters parameters in billing tools.
| Parameter | Type | Description | Required |
|---|---|---|---|
| batch_size | int | Number of dimension IDs to fetch in the first step (default: 100) | Optional |
Returns: Object with total_dimensions, dimensions_returned, by_type (map of dimension type → list of dimension objects), and dimensions (flat list). Each dimension item contains id, name, type, owner, active, anomaly_detection, and description.
Sample Questions
- "What dimensions are available for grouping my cost data?"
- "Is there a dimension for tagging by team or department?"
- "Show me all dimensions that support anomaly detection."
- "What dimension ID should I use to group costs by environment?"
Reserved Instances (RI)
get_ri_recommendations
get_ri_recommendationsGet Reserved Instance purchase recommendations based on historical usage patterns. Helps identify where committing to reserved capacity would reduce costs versus on-demand pricing.
| Parameter | Type | Description | Required |
|---|---|---|---|
| project_id | list[str] | Tenant/project IDs | Mandatory |
| services | list[str] | Cloud providers to query (e.g. ["AWS"], ["Azure"]) | Mandatory |
| term | int | Reservation term in years: 1 (default) or 3 | Optional |
| payment_option | str | "No_Upfront" (default), "Partial_Upfront", or "All_Upfront" | Optional |
| currency | str | Currency code (default: "USD") | Optional |
| page | int | Page number for pagination (default: 1) | Optional |
| limit | int | Recommendations per page (default: 50) | Optional |
| compute_forecast | bool | Include cost forecast in response (default: False) | Optional |
Returns: Object with total_records summary and output containing the list of RI purchase recommendations.
Sample Questions
- "What Reserved Instances should I buy for my AWS workloads?"
- "Show me 3-year RI recommendations with all-upfront payment for Azure."
- "How much can I save by purchasing RIs for my EC2 fleet?"
- "Give me RI recommendations for both AWS and GCP."
get_ri_reservations
get_ri_reservationsList existing Reserved Instance reservations for a given time period. Returns reservation IDs that can be passed to get_ri_reservation_coverage and get_ri_reservation_utilization.
| Parameter | Type | Description | Required |
|---|---|---|---|
| date_filter | str | Time period (e.g. "current_month") | Mandatory |
| currency | str | Currency code (default: "USD"). Supports 55 currency codes (AED, ARS, AUD … ZAR) | Optional |
| service | str | Cloud provider filter. Valid: AWS, Azure, AzureStack, Azure_CSP, Azure_EA, Azure_MCA, GCP, OCI, Openstack, and others | Optional |
Returns: Object with total_records summary and output containing the list of reservations with their IDs and basic details.
Sample Questions
- "List all my AWS Reserved Instances for the current month."
- "How many Azure reservations do I have active right now?"
- "Show me all reservations across all cloud providers this month."
get_ri_reservation_coverage
get_ri_reservation_coverageGet coverage metrics for a specific Reserved Instance — the percentage of eligible on-demand usage that is being covered by the reservation.
| Parameter | Type | Description | Required |
|---|---|---|---|
| cloud_account_id | str | Cloud service account ID (24-character hex string) | Mandatory |
| reservation_id | str | Reservation UUID (e.g. "191a4aef-7238-43f1-bf93-b07cd79a5b5e") | Mandatory |
| date_filter | str | Time period. Valid: "mtd" (default), "last_month", "last_3_months", "last_6_months", "ytd", "last_year" | Optional |
Returns: Object with cloud_account_id, reservation_id, date_filter, and output containing the coverage details from the API.
Sample Questions
- "What is the coverage rate for reservation
191a4aef-…this month?" - "How well is my EC2 Reserved Instance covering actual usage over the last 3 months?"
- "Is my Azure reservation covering enough of my VM usage year-to-date?"
get_ri_reservation_utilization
get_ri_reservation_utilizationGet utilization metrics for a specific Reserved Instance — how much of the purchased reserved capacity is actually being used. Low utilization means paying for unused capacity.
| Parameter | Type | Description | Required |
|---|---|---|---|
| cloud_account_id | str | Cloud service account ID (24-character hex string) | Mandatory |
| reservation_id | str | Reservation UUID | Mandatory |
| date_filter | str | Time period. Valid: "mtd" (default), "last_month", "last_3_months", "last_6_months", "ytd", "last_year" | Optional |
Returns: Object with cloud_account_id, reservation_id, date_filter, and output containing the utilization details from the API.
Sample Questions
- "What is the utilization rate for my EC2 RI
191a4aef-…this month?" - "Are any of my Reserved Instances significantly under-utilized?"
- "Show utilization for reservation
abc-xyzover the last 6 months." - "Which reservations should I consider selling on the marketplace due to low utilization?"
Savings
get_savings_summary
get_savings_summaryCombined savings overview that aggregates RI recommendation data and cost-saved-to-date metrics in a single call. Runs two data fetches in parallel (fail-open): potential savings from RI recommendations, and actual savings realized to date.
| Parameter | Type | Description | Required |
|---|---|---|---|
| provider | list[str] | Cloud providers to include. Defaults to ["AWS", "Azure", "GCP"] | Optional |
| term | str | Reservation term in years: "1" (default) or "3" | Optional |
| payment_option | str | "No_Upfront" (default), "Partial_Upfront", or "All_Upfront" | Optional |
| currency | str | Currency code (default: "USD") | Optional |
Returns: Object with recommendations_count, potential_savings, total_reservations, cost_saved_till_date, cost_saved_current_month, potential_recommended, by_cloud (per-provider breakdown), and currency.
Sample Questions
- "How much have we saved through cost optimization recommendations so far?"
- "What is our total potential saving from RI purchases across all clouds?"
- "Show me the savings breakdown by cloud provider."
- "How much did we save this month versus the total savings to date?"
- "What is the potential saving if I switch to 3-year All-Upfront reservations?"
Updated 14 days ago